How to replace quotation marks with "

im trying to mediaplayer embed echo with IF statement. is there any way to replace all quotation marks (") with (\")?

thank..

+3
source share
2 answers

For comments and other answers, indicate that your question may not be explicit enough. If you just want to replace double quotes ( "), you should use str_replace ()

str_replace('"', '\"', $string);
+7
source

addslashes will do the trick.

It will return a new line with all quotation marks ( ' and " ) with its escaped copies.

+5
source

Source: https://habr.com/ru/post/1740696/


All Articles