preg_replace_callback(), how to pass function argument/param?
- From: micky@xxxxxxxxxxxxx (Micky Hulse)
- Date: Sun, 30 Mar 2008 01:17:55 -0700
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>
.
- Follow-Ups:
- Prev by Date: Re: [PHP] new lines in textareas?
- Next by Date: auto generated PDF
- Previous by thread: Re: [PHP] new lines in textareas?
- Next by thread: Re: [PHP] preg_replace_callback(), how to pass function argument/param?
- Index(es):