Skip to content

Instantly share code, notes, and snippets.

@Reedyn
Last active August 29, 2015 13:57
Show Gist options
  • Save Reedyn/9640497 to your computer and use it in GitHub Desktop.
Save Reedyn/9640497 to your computer and use it in GitHub Desktop.
for (student in students) {
// Loop through available students.
if (typeof student.question !== “undefined”) {
// If student has question, ask question.
student.askQuestion();
}
}
<?php
foreach($students as $student) {
// Loop through available students.
if (isset($student->question)) {
// If student has question, ask question.
$student=>askQuestion();
}
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment