Re: Function by reference?
| From: | Max A. Derkachev | Date: | Wed, 31 Jan 2001 08:35:00 +0000 |
| Subject: | Re: Function by reference? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-37438@lists.php.net to get a copy of this message | ||
Hello Niklas,
Wednesday, January 31, 2001, 7:02:49 PM, you wrote:
NS>
NS> $tmpParsing=eregi_replace("href=(\")([^*]*)(\")","href=\"\\1\"",$this->dataToBeParsed);
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