addslashes


Escaping special characters such as '

examples/intro/addslashes.php
<?php
  $str = "fruit: 'banana'";
  echo $str;
  echo "<br>"; 
  echo addslashes($str);
?>

addslashes