Using Strings In PHP stripslashes
Using the stripslashes function in PHP
Now that we know how the addslashes function works; we need to figure out how to get rid of what we put into our string. And that is where the stripslashes function comes into play.
If we pulled some information from a database that had the following variable defined:
$some_string = “This isn\’t the \”string\” that we thought we had”;and printed it it would print out as
This isn\’t the \”string\” that we thought we had
So in order to get it to print the way we want it to, we need to get rid of those slashes. We do that with the stripslashes functions.
$some_string = stripslashes($some_string);The previous line of code would remove the slashes and we would get the result we wanted.
Other functions for manipulating strings: