PHPFront

Home > PHP > Replace words in a string
The PHP website created by its users!



Replace words in a string


Author
DescriptionFind an replace words in any string using str_replace, from php.net
RatingThis script has been rated 2/5 (32 votes)

PHP Code


// Provides: You should eat pizza, beer, and ice cream every day
$phrase  = "You should eat fruits, vegetables, and fiber every day.";
$healthy = array("fruits", "vegetables", "fiber");
$yummy  = array("pizza", "beer", "ice cream");



Rate it: Print Print

Comments


No comments posted yet.

Name
Website
Your comment