note 20918 added to function.preg-replace-callback
| From: | oyoryelNOSPAM at hotNOSPAMmail dot com | Date: | Mon, 22 Apr 2002 01:23:44 +0000 |
| Subject: | note 20918 added to function.preg-replace-callback | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-29664@lists.php.net to get a copy of this message | ||
If you want to be able to change variables of the class in the callback function, you have to use
preg_replace_callback(pattern, array(&$this, 'method_name'), subject)
Probably very obvious, but it kept me busy for a while...
--
http://www.php.net/manual/en/function.preg-replace-callback.php
http://master.php.net/manage/user-notes.php?action=edit+20918
http://master.php.net/manage/user-notes.php?action=delete+20918
http://master.php.net/manage/user-notes.php?action=reject+20918