PHP String str_replace() Function
Program 1
<html> <head><title>String in PHP Application</title> <body> <pre> <center> <?php // $myname=["vivek","rajesh","dipesh","vikas","ravi","vikas"]; // print_r($myname); // $newname=str_replace("vikas","kapil",$myname); // print_r($newname); //$mystr="Data Flair free php course with free Data Flair php course certificate"; // $a=["php","course"]; // $b=["java","subject"]; // $mystr=str_replace($a,$b,$mystr); //$mystr=str_ireplace("Php","",$mystr); // echo $mystr; $mystr="Data Flair free php course with free Data Flair php course certificate"; $mystr=strtr($mystr,'f','F'); echo $mystr."<br>"; // $mystr=substr_replace($mystr,"java script new course ",7,20); //echo $mystr."<br>"; //str_replace() // str_ireplace() //substr_replace() //strtr() ?> </pre> </center> </body> </html>