Guest User

Untitled

a guest
Oct 17th, 2017
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. <?php
  2. $section = array('news', 'forum', 'downloads', 'imprint', 'contact');
  3. $aktuell = $section[$_GET['section']];
  4. if(isset($aktuell) === false){
  5. $aktuell = $section[0];
  6. }
  7. echo $aktuell . "<br /><ul>";
  8. foreach($section as $field => $value){
  9. if($section[$field] == $aktuell){
  10. echo "<li>" . $value . "</li>";
  11. }
  12. else {
  13. echo "<li><a href='php.php?section=" . $field . "'>" . $value . "</a></li>";
  14. }
  15. }
  16. echo "</ul>";
  17. ?>
Add Comment
Please, Sign In to add comment