PHP String Replace With Regular Expressions – String Function

 
    <?
$old_string = "I really love programming in ASP!";
$new_string = ereg_replace("ASP", "PHP", $old_string);
echo "$new_string";
?>

Enjoyed this post? Share it!

 

Leave a comment

Your email address will not be published.