Darihon

Untitled

Dec 3rd, 2014
292
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.55 KB | None | 0 0
  1. <?php
  2. $words = array("Appel"=>"","Armen"=>"","Aders"=>"","Boten"=>"","Boven"=>"","Breed"=>"","Conus"=>"","Cadet"=>"","Clown"=>"");
  3. $a=array_rand($words,1);
  4. $b=print_r($a);
  5.  
  6. $first= substr($a, -5, -4);
  7.  
  8. echo("<br/>The word contains 5 letters.<br/>");
  9. ?>
  10. <html>
  11. <head>
  12.     <title>Lingo</title>
  13. </head>
  14. <body>
  15. <?php
  16. echo("<br/>Give it a try (5):");
  17. ?>
  18.     <form action="output.php" method="get">
  19.         <input type='text' name='input' id='input' value='<?php echo($first)?>' maxlength='5'>
  20.         <input type='submit' value='Guess'>
  21.     </form>
  22.  
  23. </body>
  24. </html>
Advertisement
Add Comment
Please, Sign In to add comment