preg_replace_callback(), how to pass function argument/param?
| From: | Micky Hulse | Date: | Sun, 30 Mar 2008 08:17:55 +0000 |
| Subject: | preg_replace_callback(), how to pass function argument/param? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-272302@lists.php.net to get a copy of this message | ||
Hi,
This is probably simple to answer for most of ya'll, but...
preg_replace_callback($f, 'mah_processTags', $text);
Besides the matches, how would I pass function args/param to mah_processTags()?
For example, I would like to do something like this:
preg_replace_callback($f, 'mah_processTags($arg1)', $text);
function mah_processTags($matches, $arg1) { ... }
Is this even possible? I just want to pass-in $arg1 along with the matches. :)
Possible?
Many thanks in advance!!!
Cheers,
Micky
--
Wishlist: <http://tinyurl.com/22xonb>
Switch: <http://browsehappy.com/>
BCC?: <http://snipurl.com/w6f8>
My: <http://del.icio.us/mhulse>