Re: unexpected '@' in preg_replace???

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 10/29/07, Zoltán Németh <znemeth@xxxxxxxxxxxxxx> wrote:
> hi list,
>
> I have this code:
[snip!]
> Parse error: syntax error, unexpected '@'
> in /home/znemeth/public_html/test/pregreplacetest1.php(94) : regexp code
> on line 1
>
> Fatal error: preg_replace() [<a
> href='function.preg-replace'>function.preg-replace</a>]: Failed
> evaluating code: _nemeth@xxxxxxxxxxxxxxxx
> in /home/znemeth/public_html/test/pregreplacetest1.php on line 94
[snip=again!]

    Zoltan,

    If you're using preg_replace(), where are your start and stop
characters for the pattern and subject?

    $szoveg = preg_replace('/'.$mit.'/','/'.$mire.'/',$dokumentum);

    You could otherwise try ereg_replace(); without the slashes, or do
an htmlentities($dokumentum);.

-- 
Daniel P. Brown
[office] (570-) 587-7080 Ext. 272
[mobile] (570-) 766-8107

Give a man a fish, he'll eat for a day.  Then you'll find out he was
allergic and is hospitalized.  See?  No good deed goes unpunished....

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux