addslashes()

It  returns a string with backslashes in front of the specified characters

Example

<?php
echo addslashes(‘p/h”p{[^’);
?>

Output

p/h”p{[^

Share