PHP substr_count() Function
Program 1
<html> <head><title>String in PHP Application</title> <body> <pre> <center> <?php //$email="[email protected]"; $mystr="Data flair free course of java script every course is free in Data flair"; // $n=substr_count($mystr,"free",21); // echo $n; // $n=substr_count($mystr,"free"); // echo $n; //echo str_word_count($mystr,1); // $myarray=str_word_count($mystr,); // print_r($myarray); // $count=0; // for($i=0;$i<strlen($mystr);$i++) // { // if($mystr[$i]==' ') // $count++; // } // echo "<br> Total Space is ".$count // $n=strlen($mystr); // echo $n; //strlen() //str_word_count() //sub_str_count() ?> </pre> </center> </body> </html>