Advertisement
Guest User

Untitled

a guest
Jun 24th, 2016
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. echo "<script> var students = [[],[]];";
  2. $students = "";
  3. for($i=0; $i<$query->rowCount(); $i++) {
  4. echo "students[$i][0] = " . $result[$i]['studentID'] . ";";
  5. echo "students[$i][1] = " . $result[$i]['coachID'] . ";";
  6. echo "students[$i][2] = " . $result[$i]['schoolID'] . ";";
  7. echo "students[$i][3] = '" . $result[$i]['firstName'] . "';";
  8. echo "students[$i][4] = '" . $result[$i]['lastName'] . "';";
  9. echo "students[$i][5] = " . $result[$i]['grade'] . ";";
  10. $students .= "<option value='$i'>" . $result[$i]['firstName'] ."</option>";
  11. }
  12. echo "</script>";
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement