How to remove quotation marks in php: First create a PHP sample code file; then use the "str_replace()" function to replace the quotation marks ["]. The code statement is "".
##php remove quotation marks
<?php $s=str_replace('"','', $str); ?>
<?php echo $s=str_replace("one","two", "hello one"); ?>
str_replace() Function introduction:
str_replace() function replaces some characters in the string (case sensitive). This function must follow the following rules: If you search The string is an array, then it will return an array.If the searched string is an array, then it will find and replace each element in the array. If an array needs to be searched and replaced at the same time, and the elements that need to be replaced are less than the number of found elements, the excess elements will be replaced with empty strings. If it is an array Search, but only replace a string, then the replacement string will work on all found values. Note: This function is case-sensitive. Please use the str_ireplace() function to perform Case-sensitive search.Note: This function is binary safe.Syntaxstr_replace(find,replace,string,count)
PHP Tutorial"
The above is the detailed content of How to remove quotes in php. For more information, please follow other related articles on the PHP Chinese website!