pHp sop2 program vowels

 <!DOCTYPE html>


<head><title>Count vowels</title>


<?php


function count_vowel()


{


$str=$_GET['str'];


$acount=substr_count($str,"a");


$a1count=substr_count($str,"A");


$ecount=substr_count($str,"e");


$e1count-substr_count($str,"E");


$icount=substr_count($str,"i");


$i1count=substr_count($str,"I");


$ocount=substr_count($str,"o");


$o1count=substr_count($str,"0");


$ucount=substr_count($str,"u");


$u1count=substr_count($str,"U");


$a= $acount + $alcount;


$e $ecount + $elcount;


$i$icount + $i1count;


$o$ocount + $o1count;


$u$ucount + $u1count;


echo "a occurs = ". $a." times";


echo "<br>";


echo "e occurs = ".$e." times";


echo "<br>";


echo "i occurs= ". $i." times";


echo "<br>";


echo "o occurs = ". $o." times";


echo "<br>";

echo "u occurs = ". $u." times";


}


count_vowel();


?></head><body></body></html>

Comments

Popular posts from this blog

Html sop7 image mapping

About me

Sahil