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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With