hello. im trying to echo mediaplayer embed code with IF statement. is there any way to replace all quotation marks (") with (\")'s ?
thank you..
hello. im trying to echo mediaplayer embed code with IF statement. is there any way to replace all quotation marks (") with (\")'s ?
thank you..
As comments and other answers indicate your question may not be quite explicit enough. Taking it at face value, if you just want to replace double quotes ("
) you should use str_replace()
str_replace('"', '\"', $string);
addslashes
will do the trick.
It will return a new string with the all the quotes ( '
and "
) with their escaped counterparts.