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

How to remove double quotes in php

藏色散人
Release: 2023-03-04 06:54:02
Original
5531 people have browsed it

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);
Copy after login

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)
Copy after login

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!

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