str_replace() accepts arrays for all its arguments
<?php
$source = array("a","b" );
$search = array( "a", "2000" );
$replace = array ( "b", "2001" );
$source = str_replace( $search, $replace, $source );
foreach ( $source as $str )
print "$str<br>";
?>
Related examples in the same category