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

How to remove backslashes in string in php?

青灯夜游
青灯夜游Original
2020-08-19 15:58:383768browse

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)

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!

Statement:
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