PHP stripcslashes() Function

Last Updated : 7 Feb 2026

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