How to escape double quote in string with PHP

1 Answer

0 votes
$s = 'php"java"c"python';

$s = addslashes($s);

echo $s;

  
     
/*
run:
          
php\"java\"c\"python
   
*/

 



answered Oct 12, 2019 by avibootz

Related questions

...