<?php
print'<table border="1">';
for($a=1;$a<=10;$a++)
{
 print '<tr>';
 for($b=1;$b<=10;$b++)
 {
    print'<td>';
    print ' <br> ';
    print $b . "x" . $a. "=".$a*$b;
    print'</td>';
 }
print'</tr>';
}
?>

 

<html>  
 <body>       
 <form action="hesapla.php" method="POST">           
 <label>Daire Yarıçapı:</label>
 <input name="r"></input>          
<input name="submit" type="submit" value="Hesapla">
</div>
</form> 
</body>
</html>

<?php
function hesapla($r)
{
    $pi = 3.14;
    $alan = $r*$r*$pi;
    return $alan;
}
$r = $_POST["r"];
if(!empty($r))
{
    echo "Yaricap: ",$r,"<BR>";
    echo "Alan:",hesapla($r);
}
else
    echo "Yaricap bos birakilamaz.";
?>

 

<?php
$sayi=5;
$fak=1;
for ($i=1; $i<=$sayi; $i++)
{
    $fak=$fak*$i;
    echo $i.”! = “.$i;
    if ($i>1)
    {
      for ($k=$i; $k>=2; $k–)
      {
        echo ” x “.($k-1);
        if (($k-1)==1)
        {
           echo “<br>”;
        }
      }
    }
        elseif($i==1) 
       {
           echo “<br>”;
       }
}
    echo “<b>”.”<br>”.$sayi.”‘in faktöriyeli = “.$fak.” dir.”.”<b>”;

?>