PHP - Switch include


/ Published in: PHP
Save to your folder(s)



Copy this code and paste it in your HTML
  1. <?php
  2.  
  3. switch ($section) {
  4. case "projects":
  5. echo '<script src="'.$baseincludes.'js-projects.js" type="text/javascript"></script>';
  6. break;
  7. case "management-team":
  8. echo '<script src="'.$baseincludes.'js-management.js" type="text/javascript"></script>';
  9. break;
  10. }
  11.  
  12. ?>

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.