Home >Backend Development >PHP Problem >How to remove backslashes in string in php?
In PHP, backslashes can be removed through the stripslashes() function. The stripslashes() function can remove backslashes from a string and return a string without escaped backslashes.
Recommended: "PHP Video Tutorial"
stripslashes
(PHP 4, PHP 5, PHP 7)
stripslashes — Backquote a quoted string
Syntax:
stripslashes(string)
Parameters:
string: required. Specifies the string to check.
Return value: Returns the string with backslashes stripped.
Example:
Open in browser and view the result:
For more programming-related knowledge, please visit: Introduction to Programming! !
The above is the detailed content of How to remove backslashes in string in php?. For more information, please follow other related articles on the PHP Chinese website!