|
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 = '"';
[Back to original message]
|