php string with double quotes echo backslash instead -
i have string:
while($this->stmt->fetch()){ $string=$string.'","'.$idruolo; $i++; } $str= ltrim($string,',"'); $str=stripslashes($str); echo json_encode($str);
i have tried can't delete backslash result, output:
"2\",\"1\",\"3"
this want:
"2","1","3"
try str_replace
.
$str = str_replace("\\","",$str);
Comments
Post a Comment