sanjiisan

Untitled

Apr 5th, 2017
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. <?php
  2.  
  3. for ($i = 0; $i < 99; $i++) {
  4.  
  5. $start = $i * 2;
  6. $end = $i * 3;
  7.  
  8. echo "<a href='zadanie2.php?start=$start&end=$end'>Link $start do $end</a><br>";
  9. }
  10.  
  11. ///PLIK2
  12.  
  13. <?php
  14.  
  15. if ($_SERVER['REQUEST_METHOD'] === 'GET') {
  16. if (isset($_GET['start']) && isset($_GET['end'])) {
  17.  
  18. $start = trim($_GET['start']);
  19. $end = trim($_GET['end']);
  20.  
  21. for ($i = $start; $i <= $end; $i++) {
  22. echo $i . '<br>';
  23. }
  24. } else {
  25. echo 'Nie ma wszystkich danych';
  26. }
  27. }
Advertisement
Add Comment
Please, Sign In to add comment