Today, while I was looking for str_replace() documentation, I found this example:
$phrase = "You should eat fruits, vegetables, and fiber every day.";
$healthy = array("fruits", "vegetables", "fiber");
$yummy = array("pizza", "beer", "ice cream");
// Provides: You should eat pizza, beer, and ice cream every day
$newphrase = str_replace($healthy, $yummy, $phrase);
I was laugthing like 3 minutes.
Post a Comment