ビンゴマシン

<html><body><?php
// bingo machine
    session_start();

// get from turn
    $turn = empty($_GET&#91;"turn"&#93;) ? 0 : interval($_GET&#91;"turn"&#93;);

    if($turn == 0|| empty($_SESSION&#91;"numbers"&#93;)){
        $numbers = array();
        for ($i = 1; $i <= 75; $i++){
            $numbers&#91;$i&#93; = $i;
        }
        shuffle($numbers);
        // save session
        $_SESSION&#91;"numbers"&#93; = $numbers;
    }

    $numbers = $_SESSION&#91;"numbers"&#93;;
    $num = $numbers&#91;$turn&#93;;
    $now_turn = $turn + 1;
    $next = ($turn + 1) % 75;

    echo "<p>{$now_turn}ターン目</p>";
    echo"<h1>$num</h1>";
    echo "<p><a href='bingo.php?turn=$next'>next number</a></p>";
?></body></html>