urgent Preg_replace problem. Please help

Discussion in 'PHP' started by JEET, Oct 11, 2006.

  1. #1
    Hi,
    The following command is working on my localhost connection (my PC).
    $see= preg_replace($pat, $repl, $see, -1,$countb);

    But when I upload file to server, it says:
    "warning: wrong parameter specified for count."

    So I removed the -1 in that code.
    $see= preg_replace($pat, $repl, $see, $countb);
    Now no error, but no replacement either.
    What am I doing wrong?

    I need to check the number of replacements done in the string...
    Thanks!
     
    JEET, Oct 11, 2006 IP
  2. JEET

    JEET Notable Member

    Messages:
    3,832
    Likes Received:
    502
    Best Answers:
    19
    Trophy Points:
    265
    #2
    Never mind, I counted the other way.
    Sorry for making this thread. Should have thought a little more, but was just too excited and was urgent...
    Bye :)
     
    JEET, Oct 11, 2006 IP