Re: preg_replace match, works with string functions?
Posted: Fri Mar 06, 2009 5:12 pm
I think you need to use preg_replace_callback if you want to use a function to handle the replacement.
A community of PHP developers offering assistance, advice, discussion, and friendship.
http://forums.devnetwork.net/
Code: Select all
$test = 'Hello <B>THERE<I>';
$test = preg_replace('/.*?\.*?/e', "return strtolower('\\1');", $test);