Home > Backend Development > PHP Problem > How to remove backslashes in string in php?

How to remove backslashes in string in php?

青灯夜游
Release: 2023-03-04 19:18:02
Original
3866 people have browsed it

In PHP, backslashes can be removed through the stripslashes() function. The stripslashes() function can remove backslashes from a string and return a string without escaped backslashes.

How to remove backslashes in string in php?

Recommended: "PHP Video Tutorial"

stripslashes

(PHP 4, PHP 5, PHP 7)

stripslashes — Backquote a quoted string

Syntax:

stripslashes(string)
Copy after login

Parameters:

string: required. Specifies the string to check.

Return value: Returns the string with backslashes stripped.

Example:

How to remove backslashes in string in php?

Open in browser and view the result:

How to remove backslashes in string in php?

For more programming-related knowledge, please visit: Introduction to Programming! !

The above is the detailed content of How to remove backslashes in string in php?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
php
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