Advertisement
Guest User

Untitled

a guest
Nov 26th, 2014
146
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. <body>
  2. <form method="post" action="
  3. <table border="1">
  4.  
  5. <?php
  6.  
  7. $f="/words.txt"; //definitions also included in this file
  8. $o=file($f);
  9. $len=count($o);
  10.  
  11. $i=0;
  12. while( $i < 18){
  13. $rnum= rand(2,$len);
  14. $rword= $o[$rnum];
  15. $piece= explode(" ",$rword); //get just the word on the line
  16.  
  17. if($i%3==0){
  18. echo "<tr>";
  19. }
  20. echo "<td id='$i' onclick='about()'>".$piece[2]."</td>";
  21. $i++;
  22. if($i%3==0){
  23. echo "</tr>";
  24. }
  25. }
  26. ?>
  27.  
  28. </table>
  29. </body>
  30. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement