using str_replace function you can replace the array of strings in a given string
eg:
$phrase = "You should eat fruits, vegetables, and fiber every day."; $healthy = array("fruits", "vegetables", "fiber"); $yummy = array("pizza", "beer", "ice cream");
$newphrase = str_replace($healthy, $yummy, $phrase);
Learn to Develop an iPhone or iPad App in 4 Weeks Learn the latest and greatest markup language in the market with Robin Nixon(HTML & HTML5) Now $29 Only(75% Off)
using str_replace function
Sun, 06/22/2008 - 19:03 — adminusing str_replace function you can replace the array of strings in a given string
eg:
$phrase = "You should eat fruits, vegetables, and fiber every day.";
$healthy = array("fruits", "vegetables", "fiber");
$yummy = array("pizza", "beer", "ice cream");
$newphrase = str_replace($healthy, $yummy, $phrase);