PHP stripslashes
The PHP stripslashes function is just the opposite of addslashes to add backslashes to strings. The main function of the stripslashes function is to remove the backslashes. For example, a string containing backslashes "Thank\'s" is converted once with stripslashes. It can be restored to a result such as "Thank's", which is usually used to display the data on the web page after the data is retrieved from the database. The string is processed before the display to avoid wrong data. In addition, the PHP stripslashes function can be used to process array contents in addition to processing strings .
Basic syntax of PHP stripslashes
String stripslashes( $string)
Put the string $string to be converted into the parentheses of the stripslashes function to convert, and return the conversion result. If the string $string does not contain any backslashes, the returned result is the same as the original string $string. This means that the stripslashes function does not change the content of the original string.
PHP stripslashes example
$string='Thank\'s for your help.';
echo stripslashes($string);
?>
Post a Comment
0 Comments