Kanika Kanika - 5 months ago 17x
PHP Question

How can I remove slashes from strings?

I am trying to do some PHP programming concepts and I am not aware of some in-build functions. So my doubt is:

In PHP, how to remove slashes from strings? Is there any function available in PHP for this??


$string="people are using Iphone/'s instead of Android phone/'s";


You can use stripslashes() function.

$str = "Is your name O\'reilly?";

// Outputs: Is your name O'reilly?
echo stripslashes($str);