All pastes #609711 Raw Edit

Something

public text v1 · immutable
·published 2007-07-09 01:18 UTC
rendered paste body
function get_question($type, $questions)
{
        global $main, $_SESSION;

        $random_question = rand(1, $questions['count']);

        while ($_SESSION['questions'][$type][$random_question]) 
        {
                $random_question = rand(1, $questions['count']);       
        }       

        return $random_question;
}