You are here: Re: preg_replace « PHP Programming Language « IT news, forums, messages
Re: preg_replace

Posted by Raj on 10/27/50 11:33

"Chung Leong" <chernyshevsky@hotmail.com> wrote in message
news:1133377396.630480.258350@g14g2000cwa.googlegroups.com...
> What you need is
>
> $tmp = preg_replace('/<!-- (\S+) -->/ge', '$values[\1]', $line);
>
> The quotes are needed around $values[\1] because you want to pass it as
> code to PCRE.

Thanks Chung...this worked:

$tmp = preg_replace('/<!-- (\S+) -->/e', '$values["\1"]', $line);

Thanks all for your help!

Regards,
Raj

 

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

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