You are here: Re: ereg_replace syntax question, thank you :) « All PHP « IT news, forums, messages
Re: ereg_replace syntax question, thank you :)

Posted by peter on 08/26/07 02:00

>I think this is the right command., could someone please show me how
> to replace instances of a quote like this " with its html version -
> ". I am mixed up with the escaping, etc. Thank you :-)
>
> ereg_replace( " " ," '",$fixedstring; )

This really depends upon the reason you wish to replace the double quote. If
it is definately only " you wish to change to its html equivalent you can do
:-

echo ereg_replace( '"' ,""",$string);

If you wish to change all html chars you can use:-

echo htmlspecialchars($string);

in both cases I have string as:-

$string = '"';

 

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

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