Connecting...

This is a quick preview of the lesson. For full access, please Log In or Sign up.
For more information, please see full course syllabus of Introduction to PHP
For more information, please see full course syllabus of Introduction to PHP
Introduction to PHP More on Conditional Loops
Lecture Description
In this lesson our instructor talks more on conditional loops. First, he discusses do-while loop, continue statement, and break statement. Then he talks about infinite loops, common loop pitfalls, and some coding conventions. He ends the lesson with a helpful homework challenge.
Bookmark & Share
Embed
Share this knowledge with your friends!
Copy & Paste this embed code into your website’s HTML
Please ensure that your website editor is in text mode when you paste the code.(In Wordpress, the mode button is on the top right corner.)
×
Since this lesson is not free, only the preview will appear on your website.
- - Allow users to view the embedded video in full-size.
Next Lecture
Previous Lecture
0 answers
Post by Andrew Showalter on February 13, 2013
Try a different browser.
1 answer
Tue Feb 7, 2012 3:46 AM
Post by Massimo Raimondi on January 22, 2012
FYI, this exercise is misleading... it says if the number generated is EVEN output the number, if it is ODD then DO NOT output the number. meanwhile in the homework solutions it is the complete opposite...
as per the homework solutions this is what is outputted:
$randNum = 9
$randNum = 1
$randNum = 9
$randNum = 1
Because the do-while loop has exited, the number 5 has been generated.