PHP stripcslashes() Function

4 Sept 2024 | 1 min read

The stripcslashes() is predefine function of PHP. It is used to remove backslashes and clean up data retrieved from a database or from an HTML form. It returns a string with backslashes stripped off.

This function stripcslashes() is important while we need to remove the backslashes.

Syntax:

ParameterDescriptionRequired/Optional
Stringused to specify the string to checkrequired

Example 1

Output:

Hello PHP! 

Example 2

Output:

Before using 'stripcslashes()' Function: Hello, we areLearning PHP from javaTpoint. By using 'stripcslashes()' Function: Hello, we areLearning PHP from javaTpoint. 

Reference:

http://php.net/manual/en/function.stripcslashes.php
Next TopicPHP String