- addslashes: To add black slashes infront of single and double quotations.
- stripslashes: This is used to remove the back slashes infront of single and double quotations.
<?php
$str=”wel’come”;
$str1=$str;
echo addslashes($str1);
echo stripslashes($str1);
?> - addcslashes: To add escape slash “\” infront of specified characters.
- stripcslashes: To remove slashes.
<?php
$str=”welcome”;
$str1=addcslashes($str,”e”);
echo $str1;
echo stripcslashes($str1);
?>