function factorial($n){ $factorial = 1; for ($i=$n; $i>=1; $i--) { $factorial = $factorial * $i; } return $factorial; }
function factorial($n){ if (1<$n){ return $n*factorial($n-1); }else { return 1; } }$result=factorial(6); echo $result;
<?php $a =array("dhaka","comillah","nator","rajshahi"); foreach ($a as ${ echo $b."<br>"; } echo "<br>"; asort($a); foreach($a as $c){ echo $c."<br>"; } ?>
Comments 1