1. 1.
    0
    @3

    <?
    if (gonder) {
    function random()
    {
    $random= rand(1,49);
    return $random;
    }

    function sortArray($a)
    {
    $temp=0;
    for($i=1;$i<6;$i++){
    for($j=1;$j<6;$j++){
    if($a[$j]<$a[$j-1]){
    $temp=$a[$j-1];
    $a[$j-1]=$a[$j];
    $a[$j]=$temp;
    }

    if($a[$j-1]==$a[$j])
    {
    $r=$j-1;
    $a[$r]=random();
    }

    }

    }
    for($i=1;$i<6;$i++){
    for($j=1;$j<6;$j++){
    if($a[$j]<$a[$j-1]){
    $temp=$a[$j-1];
    $a[$j-1]=$a[$j];
    $a[$j]=$temp;
    }
    }
    }

    for ($i=0;$i<6;$i++){
    echo ($a[$i] . " ") ;
    }
    }

    function yazdir()
    {
    for ($i=0;$i<6;$i++)
    {
    $adet[$i]=random();

    }
    sortArray($adet);
    }

    echo ("<b> Sayısal Loto Tahmini : <font color=black> ");
    yazdir();
    }
    ?>

    <form method="post" action="function1.php">
    <input type="submit" name="gonder" value="yapi$tir">
    </form>
    ···
   tümünü göster