Home > php教程 > php手册 > php stripslashes() 函数删除、过滤字符串中的反斜杠

php stripslashes() 函数删除、过滤字符串中的反斜杠

WBOY
Release: 2016-06-01 09:45:13
Original
2427 people have browsed it

定义和用法

stripslashes() 函数删除由 addslashes() 函数添加的反斜杠。

提示:该函数可用于清理从数据库中或者从 HTML 表单中取回的数据。

 

语法

<code class="language-php">stripslashes(string)</code>
Copy after login
参数 描述
string 必需。规定要检查的字符串。

 

返回值

返回值: 返回已剥离反斜杠的字符串。
PHP 版本: 4+

 

实例

删除反斜杠:

<code class="language-php"><?php echo stripslashes("Who\'s Bill Gates?");
?></code>
Copy after login

在线运行

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 Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template