Advertisement
aridokmecian

Untitled

Oct 7th, 2017
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.76 KB | None | 0 0
  1. <?php
  2. $classBeforeTrim = file("classList.txt");
  3.  
  4. for ($y = 0; $y < count($classBeforeTrim); $y++) {
  5. $class = trim($classBeforeTrim[$y]);
  6. $eecs = explode(",", $class);
  7. $course = "EECS";
  8. $year = "1st year";
  9.  
  10. if (in_array($course , $eecs) && in_array($year , $eecs)){
  11. print "<p class=\"highlight bold\"> $classBeforeTrim[$y] </p>";
  12. }
  13. elseif (in_array($course , $eecs)) {
  14. print "<p class=\"highlight\"> $classBeforeTrim[$y] </p>";
  15. }
  16. elseif (in_array($year , $eecs)) {
  17. print "<p class=\"bold\"> $classBeforeTrim[$y] </p>";
  18. }
  19. else {
  20. print "<p> $classBeforeTrim[$y]</p>";
  21. }
  22.  
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement