Home >Backend Development >PHP Problem >How to remove double quotes in php

How to remove double quotes in php

藏色散人
藏色散人Original
2020-08-08 10:15:175534browse

How to remove double quotes in php: First create a PHP sample file; then use the "$s=str_replace('"', '', $str); method to remove double quotes.

How to remove double quotes in php

Recommended: "PHP Video Tutorial"

php remove double quotes:

Code example:

$s=str_replace('"', '', $str);

Just replace it directly.

Related introduction:

str_replace() function replaces some characters in the string (case sensitive).

This function must follow the following rules:

If the searched string is an array, then it will return an array.

If the searched string is an array, then it will Search and replace each element in the array.

If you need to search and replace an array at the same time, and the elements that need to be replaced are less than the number of found elements, then the extra elements will Replace with an empty string.

If you search an array and replace only one string, the replacement string will apply to all found values.

Comment: This function is case-sensitive. Please use the str_ireplace() function to perform a case-insensitive search.

Comment: This function is binary-safe.

Syntax

str_replace(find,replace,string,count)

The above is the detailed content of How to remove double quotes 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