Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- session_start();
- $q = array(
- "What colour is blue?",
- "What colour is red?"
- );
- $a = array(
- "Blue",
- "Red"
- );
- $random = rand(0, count($q) - 1);
- $_SESSION["question"] = $q[$random];
- $_SESSION["answer"] = $a[$random];
- echo $_SESSION["question"];
- ?>
Add Comment
Please, Sign In to add comment