> addcslashes() and backcslashes() in php ~ Online tutorial

addcslashes() and backcslashes() in php

addcslashes() and backcslashes()
The addcslashes() function return a string with backslashes in front of the specified character
Syntax
string addcslashes( string $str,string $charlsit)

Example

<?php
$str="welcome to india";
echo $str;
echo addcslashes($str,'c');
?>


Output:



wel\come to india

backcslashes()
The backcslashes() function removed the character added from addcslashes() function
Syntax:

backcslashes(string)

<?php
echo backcslashes("wel\come to india");
?>
Output
welcome to india

Please Give Us Your 1 Minute In Sharing This Post!
Please Give Us Your 1 Minute In Sharing This Post!
SOCIALIZE IT →
FOLLOW US →
SHARE IT →
Powered By: BloggerYard.Com

0 comments: