Replace All Occurrences of a Substring in a String using PHP July 1, 2021 PHP 0 Comments 471 Views str_replace function <?php $text = 'abc def ghi abc'; $result = str_replace('abc', '123', $text); echo $result; // 123 def ghi 123
Leave a Comment
Cancel reply