Function by reference
| From: | Niklas Saers | Date: | Wed, 31 Jan 2001 21:54:27 +0000 |
| Subject: | Function by reference | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-37458@lists.php.net to get a copy of this message | ||
Hi all. I was wondering, can a reference be a function as well? Reason is, I've got to do a
little manipulating. I want to do a
$tmpParsing=eregi_replace("href=(\")([^*]*)(\")","href=\"\\1\"",$this->dataToBeParsed);
where I want \\1 to be fed into urlencode() I was thinking somewhere along the lines
$func=&urlencode;
$tmpParsing=eregi_replace("href=(\")([^*]*)(\")","href=\"$func(\\1)\"",$this->dataToBeParsed);
Cheers
Niklas Saers