whitestarrr

Untitled

Feb 19th, 2017
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.68 KB | None | 0 0
  1. <?php
  2. if (isset($_GET['submit'])
  3. && !empty($_GET['categories'])
  4. && !empty($_GET['tags'])
  5. && !empty($_GET['months'])) {
  6. $categories = explode(", ", $_GET['categories']);
  7. $tags = explode(", ", $_GET['tags']);
  8. $months = explode(", ", $_GET['months']);
  9.  
  10. echo '<h2>Categories</h2><ul>';
  11. foreach ($categories as $category) {
  12. echo '<li>' . $category . '</li>';
  13. }
  14. echo '</ul>';
  15.  
  16. echo '<h2>Tags</h2><ul>';
  17. foreach ($tags as $tag) {
  18. echo '<li>' . $tag . '</li>';
  19. }
  20. echo '</ul>';
  21.  
  22. echo '<h2>Months</h2><ul>';
  23. foreach ($months as $month) {
  24. echo '<li>' . $month . '</li>';
  25. }
  26. echo '</ul>';
  27. }
Advertisement
Add Comment
Please, Sign In to add comment