w3resource

PHP : stripcslashes() function

Description

The stripcslashes() function is used to remove backslashes added by the addslashes() function.

Version:

(PHP 4 and above)

Syntax:

stripcslashes(string1)

Parameter:

Name Description Required /
Optional
Type
string1 The string to be unescaped. Required String.

Return value:

The unescaped string.

Value Type: String.

Pictorial Presentation

php-string-stripcslashes()

Example:

<?php
echo stripcslashes("Thank\s. Please v\isit again.");
?>

Output:

Thanks. Please visit again.

View the example in the browser

See also

PHP Function Reference

Previous: strip_tags
Next: stripos



PHP: Tips of the Day

Finding the number of days between two dates

$now = time(); // or your date as well
$your_date = strtotime("2010-01-31");
$datediff = $now - $your_date;

echo round($datediff / (60 * 60 * 24));

Ref : https://bit.ly/2ZDZ4as