You are here: Re: Functions in replacement string of eregi_replace « PHP « IT news, forums, messages
Re: Functions in replacement string of eregi_replace

Posted by M. Sokolewicz on 09/27/66 11:05

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

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация