stripcslashes – PHP String Functions

Syntax :

string stripcslashes ( string);

Description :

It’s an inbuilt function of PHP. stripcslashes() function un-quote string quoted with addcslashes(). Recognizes C-like \n\r …, octal and hexadecimal representation.

Note : We can use this function to clean up data fetched from a database or data which is submitted by an HTML form.

Parameter :

  • string – This is a Required parameter. The string to be unescaped.

Output :

Returns the unescaped string. Removes the backslashes from string.


Related articles : addslashes(), addcslashes(), stripcslashes().


stripcslashes() – PHP Functions Example 1 :
<?php
echo stripcslashes("Who\'s Charles?");
?>

Output of above code in the browser is as below:

Who’s Charles?

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *