Advertisement
Guest User

Untitled

a guest
Jul 19th, 2018
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. <?php
  2.  
  3. $names = array('Luda','Galya','Cocok','4JIEH',"DURA");
  4. // 0 1 2 3
  5.  
  6. $names[0];
  7.  
  8. $y = 0;
  9. while ($y < (count($names))) {
  10. echo "\n";
  11. echo $names[$y];
  12. $y++;
  13. }
  14.  
  15. echo "\n";
  16.  
  17.  
  18. for ($i = 0; $i < (count($names)); $i++) {
  19. echo "\n";
  20. echo $names [$i];
  21. }
  22.  
  23. echo "\n";
  24. foreach ($names as $value) {
  25. echo "\n";
  26. echo $value;
  27. }
  28.  
  29. $nambers = array();
  30. echo "\n";
  31.  
  32. $i = 1;
  33.  
  34. while ($i <= 100) {
  35. array_push($nambers, $i);
  36.  
  37. $i++;
  38. }
  39.  
  40. echo "\n";
  41. echo count ($nambers);
  42.  
  43.  
  44.  
  45.  
  46. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement