Mega Code Archive

 
Categories / Php / Strings
 

Str_replace() function searches for occurrence in string, replacing all instances with replacement

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); ?>