HTML字符在PHP中解析; 反斜杠休息

<script type="text/javascript">  
    Player.embed("ID", {soundFile: "http://yoursite.com/path/to/mp3_file.mp3"});  
    </script>

This is the snippet I need to parse in PHP. What characters do I need to use the backslash break on?

<script type=\"text\/javascript\">Player\.embed\(\"$2$3$4\"\, \{soundFile\: \"http://$2$3$4/$5\"\}\);  
    <\/script>

Do you mean:

 string addslashes ( string $str )

Returns a string with backslashes before characters that need to be escaped. These characters are single quote ('), double quote ("), backslash (\) and NUL (the NULL byte).

This source goes into it: http://php.net/manual/en/function.addslashes.php and this one: http://www.w3schools.com/php/func_string_addslashes.asp
From the 2nd source, the addition of escape characters can be used to prepare a string for storage in a database and database queries.

-

Note: PHP runs addslashes() on all GET, POST, and COOKIE data by default, so you don't want to do it again and get double the escape slashes.

There's also a stripslashes() function for when it you need to undo it. http://php.net/manual/en/function.stripslashes.php