Home > Article > Backend Development > How to remove double quotes in php
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.
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!