PHP str_replace not replacing quotes -
hello have following code witch scans string , suppose replace double quotes "
. problem finds double quotes, replaces them "
adds "
end of it. dosnt replace quote. dont understand im doing wrong. here code:
$lineocc31 = substr_count($text, '"'); if($lineocc31 < '1'){ $text = $text; }else{ $text = str_replace('"', '"', $text); }
$string = 'something " in it'; echo htmlentities($string);
output: "
in it
see here https://3v4l.org/afrni
Comments
Post a Comment