Home > Backend Development > PHP Tutorial > How to use php stripcslashes function

How to use php stripcslashes function

藏色散人
Release: 2023-04-04 22:38:01
Original
2483 people have browsed it

php stripcslashes function means dequoting a string escaped using addcslashes() . The syntax is stripcslashes(string). Parameter: string is required and specifies the string to be checked.

How to use php stripcslashes function

How to use the stripcslashes function?

Function: Remove the backslashes added by the addcslashes() function.

Syntax:

stripcslashes(string)
Copy after login

Parameters:

string Required, specifies the string to be checked.

Description: This function can be used to clean data retrieved from the database or from HTML forms.

php stripcslashes() function usage example 1:

<?php
echo stripcslashes("Hello \World!");
?>
Copy after login

Output:

Hello World!
Copy after login

php stripcslashes() function usage example 2:

<?php
echo stripcslashes("i&#39;m \study \in \php.cn");
?>
Copy after login

Output:

i&#39;m study in php.cn
Copy after login

This article is an introduction to the PHP stripcslashes function. I hope it will be helpful to friends in need!

The above is the detailed content of How to use php stripcslashes function. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template