Advertisement
Guest User

gottseidank dziwko

a guest
Nov 20th, 2019
137
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.84 KB | None | 0 0
  1. <!DOCTYPE HTML>
  2. <html>
  3. <head>
  4. <title> yung-adisz ma sztos</title>
  5. <meta charset="utf-8">
  6. </head>
  7. <body>
  8. <h1>D.S.</h1>
  9. <?php
  10. // foreach($yung as $x){
  11. // echo $x.'</br>';
  12. // }
  13. $adisz="Sandra, Jerzy, Anna, Wanda, Pawel, Lucja, Piotr";
  14. $yung=explode(", ", $adisz); //0..6
  15. sort($yung); //increasing
  16. $yung=array_reverse($yung); //reverses the whole array
  17. array_shift($yung); //removes first element
  18. array_push($yung,"Wladyslaw","Daniel"); //adds few more elements
  19. array_unshift($yung, "Alicja"); //adds alice as first element
  20.  
  21. $gottseidank=array("Matthew", "Jamel", "Tytus", "Carl", "Jessica", "Jesse", "Walter"); //define new array
  22. $guccigangcunt=array_merge($yung, $gottseidank); //merging two arrays into one
  23. foreach($guccigangcunt as $x){
  24. echo $x.'</br>';
  25. }
  26. ?>
  27. </body>
  28. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement