You are here: Re: <? print .. DIV> + InnerHTML question, thank you « All PHP « IT news, forums, messages
Re: <? print .. DIV> + InnerHTML question, thank you

Posted by Gregor Kofler on 08/26/07 14:58

Séverin Richard meinte:

> for single quote(') the right syntax may be:
> ereg_replace( "'","\'",$someblog[0] )
> or ereg_replace( "'","\\'",$someblog[0] )
> or ereg_replace( "'","\\\'",$someblog[0] )
>
> try all of this.

Now, that's what I call helpful... Anyway, since he's doing a lot of
trying anyway, he should either stick to preg_replace() if RegEx are
required, since *this* is proper contemporary PHP. However, in this case
RegEx is complete overkill. An ordinary str_replace() will do [1].

Gregor


[1] http://at2.php.net/str_replace


--
http://www.gregorkofler.at ::: Landschafts- und Reisefotografie
http://www.licht-blick.at ::: Forum für Multivisionsvorträge
http://www.image2d.com ::: Bildagentur für den alpinen Raum

 

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

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