RE: [PHP] rewrite urls with preg_replace

From: Date: Thu, 28 Nov 2002 16:27:53 +0000
Subject: RE: [PHP] rewrite urls with preg_replace
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-126418@lists.php.net to get a copy of this 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() ... Take a look at preg_replace_callback(). http://www.php.net/manual/en/function.preg-replace-callback.php ---John Holmes...

« previous php.general (#126418) next »