The questions repeat because each page request is completely separate from all other page requests and php has no idea that any question has already been used.
To prevent repeats, you need to remember which of the questions have already been used. You can either use a $_SESSION variable or a database table to remember which questions have been output for any visitor.
Someone posted a solution using $_SESSION variables in one of the other php help forums you posted on.
If you are learning PHP, developing PHP code, or debugging PHP code, do yourself a favor and check your web server log for errors and/or turn on full PHP error reporting in php.ini or in a .htaccess file to get PHP to help you.