PHP Str_replace

This function returns a string or an array with all occurrences of search in subject replaced with the given replace value.

Example Code:

<?php
$content = 'PHP 1 2 3';
$str = array('1','2','3');
$replace = array('is an open-source','server-side','scripting language');
$output = str_replace ($str,$replace,$content);
echo $output;
?>

Leave a Reply