Advertisement
tei123

php

Oct 28th, 2016
369
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. <html> <head>
  2. </head>
  3. <body>
  4. <?php
  5.  
  6. $tab = array(10);
  7. for ($i=0;$i<10;$i++)
  8. {
  9. $tab[$i]=rand(50,60);
  10. echo $tab[$i]." ";
  11. };
  12. echo '<br>';
  13.  
  14. $tab2 = array(10);
  15. for ($i=0;$i<10;$i++)
  16. {
  17. $tab2[$i]=rand(50,60);
  18. echo $tab2[$i]." ";
  19. };
  20. echo '<br>';echo '<br>';
  21. if ($tab==$tab2)
  22. echo 'sa takie same';
  23. else
  24. echo 'sa rozne';
  25. echo '<br>';
  26. $s=0;
  27. for ($i=0;$i<10;$i++)
  28. {
  29. $s=0;
  30. $s2=0;
  31. $s=$tab[$i];
  32. $s2=$tab2[$i];
  33.  
  34. echo $s+$s2;
  35. echo '<br>';
  36. };
  37.  
  38.  
  39. ?>
  40. </body>
  41.  
  42. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement