PHP Str_Replace() Function Searches For Occurrence In String, Replacing All Instances With Replacement. – String Function

 
Its syntax is: string str_replace (string occurrence, string replacement, string string)<?
$favorite_food = "ice, cream, chicken wings";
$favorite_food = str_replace("chicken wings", "pizza", $favorite_food);
?>

Enjoyed this post? Share it!

 

Leave a comment

Your email address will not be published.