Code Snippets Php

//using str_replace in php
//our message
$msg = "this site has a lot of asp code on it";
//the string we want added
$add_this = "php";
//replace the asp with php
$new_message = str_replace("asp" , $add_this , $msg);
//display original message then new message
echo "Original message : $msg
";
echo "New message : $new_message
";
?>