Re: Function by reference?

From: Date: Wed, 31 Jan 2001 09:07:45 +0000
Subject: Re: Function by reference?
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-37442@lists.php.net to get a copy of this message
At 11:35 31-1-01 +0300, Max A. Derkachev wrote:
Hello Niklas, Wednesday, January 31, 2001, 7:02:49 PM, you wrote: NS> $tmpParsing=eregi_replace("href=(\")([^*]*)(\")","href=\"\\1\"",$this->dataToBeParsed);
Take a look @ Preg_Replace with the e modifier, i think you are looking for that (php4 only) Greetz, Wico
NS> where I want \\1 to be fed into urlencode() I was thinking somewhere along the lines NS> $func=&urlencode; It won't work. You can not reference a function. But you can call a variable with the function name value. $func = 'urlencode' $func($str) here will do the same as urlencode($str). -- Best regards, Max A. Derkachev mailto:kot@books.ru Symbol-Plus Publishing Ltd. phone: +7 (812) 324-53-53 http://www.Books.Ru -- All Books of Russia -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net


« previous php.general (#37442) next »