Search results
Definition and Usage. The stripslashes () function removes backslashes added by the addslashes () function. Tip: This function can be used to clean up data retrieved from a database or from an HTML form.
Description. Un-quotes a quoted string. stripslashes () can be used if you aren't inserting this data into a place (such as a database) that requires escaping. For example, if you're simply outputting data straight from an HTML form.
The stripslashes () function in PHP is used to remove slashes added by the PHP addcslashes () function. It removes all slashes added by the addcslashes () function from a string. In this article, we will be discussing the stripslashes () function in detail and how it can be used in PHP.
(PHP 4, PHP 5, PHP 7, PHP 8) stripcslashes — Un-quote string quoted with addcslashes()
W3Schools Tryit Editor. Run . Get your own PHP server Result Size: 497 x 414.
stripcslashes (string $string): string. Returns a string with backslashes stripped off. Recognizes C-like \n, \r ..., octal and hexadecimal representation.
stripslashes ( string $string ) : string. Un-quotes a quoted string. An example use of stripslashes () is when the PHP directive magic_quotes_gpc is on (it was on by default before PHP 5.4), and you aren't inserting this data into a place (such as a database) that requires escaping.