19-08-2019, Saat: 02:50
Aşağıdaki fonksiyon ile yazdığınız kelimedeki sesli harfleri gösterir.
PHP Kod:
<?php
$yazi = "artefdsgdhgjkshdfughsdfjbnhbhcdfgssa";
$sesliharfler = "aeoıiöuüAEOIİÖUÜ";
$tane = 0;
for($i=0;$i < strlen($yazi);$i++)
{
if( strpos($sesliharfler ,$yazi[$i]) !== false )
$tane++;
}
echo "<b>".$yazi."</b> kelimesinde<br>";
echo $tane . " tane sesli harf var";
?>