Hy everyone how can I replace ""
// i think its called double quotes with ''
// i think its called single quotes
using PHP ?
views:
321answers:
5Thanks this worked for me;
streetparade
2010-03-11 10:56:51
+3
A:
You can use str_replace, try to use http://php.net/manual/en/function.str-replace.php it contains allot of php documentation.
<?php
echo str_replace("\"","'","\"\"\"\"\" hello world\n");
?>
Nick Hermans
2010-03-11 10:55:53
+1
A:
Try with strtr,
<?php
$string="hello \" sdfsd dgf";
echo $string;
$string = strtr($string, "\"", "'");
echo $string;
?>
karthi_ms
2010-03-11 10:57:10
+3
A:
Try with preg_replace,
<?php
$string="hello \" sdfsd \" dgf";
echo $string,"\n";
echo preg_replace("/\"/","'",$string);
?>
sganesh
2010-03-11 11:04:20