Php stripcslashes

From CoderLearner
Jump to: navigation, search

PHP function stripcslashes

This function removes backslashes in a string.

Syntax stripcslashes

  • string: string input.
stripcslashes(string)

Return

Return a string without all those backslashes.

Example 1

<?php

$str = "\kkkk\eeee\.php";
echo stripcslashes($str);
?>

Output

kkkkeeee.php

Example 2

<?php

$str = "She \loves\n \Mthem so much\n";
echo $str;
echo '<br/>';
echo stripcslashes($str);
?>

Output

She \loves \Mthem so much 
She loves Mthem so much