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('"', '&quot;', $text);         } 

$string = 'something " in it'; echo htmlentities($string); 

output: &quot; in it

see here https://3v4l.org/afrni


Comments

Popular posts from this blog

php - Permission denied. Laravel linux server -

google bigquery - Delta between query execution time and Java query call to finish -

python - Pandas two dataframes multiplication? -