jeudi 27 octobre 2016

php if else if statements

I am trying to output the variable above to output in html so I can use to report status in one column of my html tables. I have the following code but it doesn't seem to be working because i keep getting the "unexprected" error.

<?php
 $st = $row_all_students['mem_review_stat'];


  if ($st == "Pending") {
      echo "<span class="label label-info">Pending</span>";
  } elseif ($st == "on hold") {
      echo "<span class="label label-danger">Suspended</span>";
  } else {
      echo "<span class="label label-success">Reviewed</span>";
}
?>

Can someone help me with the right syntax please? Thanks in advance!

Aucun commentaire:

Enregistrer un commentaire