Hi Dieter,

You need to use the 'e' modifier as well as 'is' in your pattern. Have a
look in the manual, here:


"If this modifier is set, preg_replace() does normal substitution of
backreferences in the replacement string, evaluates it as PHP code, and uses
the result for replacing the search string."

Also look here:

And check the "Example 2. Using /e modifier" part.

Hope that helps ;)


"Dieter Koch" <[EMAIL PROTECTED]> wrote in message
> Hi to all the PHP-Fans out there,
> i have a syntax-problem with the folowing preg_replace command:
> $returnString = preg_replace("/(href=\")(.+?)(\")/is",
> preg_quote("\\1".ebLinkEncode(."\\2".)."\\3"), $returnString);
> i'm trying to call my own function within a preg_replace function and it
> won't work.
> any ideas ? it seems to me, that the quoting is incorrect, but i'm not
> shure, why it is incorrect,
> especially because i use preg_quote() ...
> thanks in advance for some hints !
> best regards

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

Reply via email to