How to remove backslashes in php: First create a PHP sample file; then delete the backslashes in the string through the "stripslashes("Who\'s Bill Gates?");" statement.
The operating environment of this article: windows7 system, PHP7.1 version, DELL G3 computer
stripslashes() function is deleted by addslashes() function. backslash.
Tip: This function can be used to clean data retrieved from the database or from an HTML form.
Syntax
stripslashes(string)
Parameters
string Required. Specifies the string to check.
Return value: Returns the string with backslashes stripped.
Example
Remove backslash:
<?php echo stripslashes("Who\'s Bill Gates?"); ?>
Run result:
Who's Bill Gates?
[Recommended learning: PHP video Tutorial】
The above is the detailed content of How to remove backslashes in php. For more information, please follow other related articles on the PHP Chinese website!