#74. PHP String Addslashes & Stipslashes Functions

 How to work PHP String Addslashes & Stipslashes Functions?

Syntax:




Run Code:

<?php

$str = "Hello I am 'Aqib Saeed'";

echo $str . "<br>";

//  echo addslashes($str) . "<br>";

// $newStr = addslashes($str);

//$newStr = addcslashes($str, "A");

$newStr = addcslashes($str, "A..Z"); //a..z

//stripslashes remove slashes
//stripcslashes
// echo stripslashes($newStr);

echo $newStr;
?>

Comments

Popular posts from this blog

#30. PHP Recursive Function