Results 1 to 24 of 24

Thread: Warning: Unknown modifier ...

Threaded View

  1. #1

    Thread Starter
    Fanatic Member cpradio's Avatar
    Join Date
    Apr 2002
    Posts
    616

    Warning: Unknown modifier ...

    I have been working on a preg_replace function that is used to create and manipulate customized code while turning it into html code. Well anyways, I am getting the following errors:
    http://cpradio.net/advBlogger/user/display.php?cid=18

    If anyone thinks they know the answer or thinks they can retrieve the answer, send me a pm or post such here, and I will pm you a link to the admin area where you will be able to write new "code" tags and see how it is supposed to operate.

    Here is the function that is computing those errors:
    PHP Code:
      function ParseCode($text "Invalid use of Function",$abCode 1) {
        if (
    $abCode) {
          
    $abArray = array();
          
    $htmlArray = array();
          
    $query mysql_query("select * from abCode");
          for(
    $i=0;$i<mysql_numrows($query);$i++) {
            
    $abTag mysql_result($query,$i,"abTag");
            
    $htmlTag mysql_result($query,$i,"htmlTag");

            
    $option 1;
            while (
    preg_match("/\{option\}/is",$abTag)) {
              
    $abTag preg_replace("/\{option\}/is","(.*?)",$abTag,1);
              
    $option++;
            }
            while (
    preg_match("/\{param\}/is",$abTag)) {
              
    $abTag preg_replace("/\{param\}/is","(.*?)",$abTag,1);
              
    $option++;
            }
            
    $abArray[$i] = $abTag;

            
    $replace 1;
            while (
    preg_match("/\{option\}/is",$htmlTag)) {
              
    $htmlTag preg_replace("/\{option\}/is",$$replace,$htmlTag,1);
              
    $replace++;
            }
            while (
    preg_match("/\{param\}/is",$htmlTag)) {
              
    $htmlTag preg_replace("/\{param\}/is",$$replace,$htmlTag,1);
              
    $replace++;
            }
            
    $htmlArray[$i] = $htmlTag;
          }

          for (
    $i=0;$i<sizeof($abArray);$i++) {
            
    // line 505 below
            
    $text preg_replace("/".preg_quote($abArray[$i])."/",$$htmlArray[$i],$text);
          }
          return 
    $text;
        }
      } 
    -Matt
    Last edited by cpradio; Jul 31st, 2002 at 04:47 PM.
    http://cpradio.net/
    Administrator @ WDForums and a Moderator @ WebXpertz City Forums

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width