Re: Functions in replacement string of eregi_replace

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Ville Mattila wrote:
Hi there!

I'm looking for a workaround to carry out a feature similar to that I could use any PHP function inside the replacement string in eregi_replace (or ereg_replace).

I have a set of HTML code with some <h2>-headers. Now I should convert all HTML headers to uppercase strings. As far as I know and have tested, I can't use code like:
$newstr = eregi_replace("<h3>([a-z0-9 \.!\?]+)</h3>", strtoupper("\\1"));


How could I do that?

Ville
use preg_replace with the /e modifier

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux