[ad_1]
Facebook –
GitHub –
Google+ –
LinkedIn –
reddit –
Support –
thenewboston –
Twitter –
Beginner PHP Tutorial – 26 – do while Loop
by
Tags:
Comments
25 responses to “Beginner PHP Tutorial – 26 – do while Loop”
-
An example where do..while loop is used is in controlling the running of a program for instance in a Bank ATM. The Main Menu in the ATM will always show as long as the customer doesn't select 'NO'..The ATM always asks the customer : After every transaction, the ATM always asks a customer : "Do you want to perform another transaction?"…As long as the answer is YES, the ATM will display the Main Menu. Hope this real-world application is clear.
-
He should have set counter to 11 (or anything above 10) to demonstrate that the echo will still show at least ONCE, even if the condition in the while loop is false. Don't know why he didn't. Sometimes I ponder his programming knowledge it makes me hesitant to continue with this series D= (I originally started with this playlist because I wanted good ole Bucky)
-
Awesome explanation (y) π π
-
Hey Alex, I wanted to tell you that you have been very helpful. But in this video you forgot to tell us that we need to terminate the line after while () loop condition.Β
do {
} while ();like this. Thank you by the way
-
I feel that PHP is a breeze after learning C. The syntax is so similar in different places.
-
Thanks for the simple explination man, helps me out
-
bles
-
Thats what it does anyway. Nomatter if I had a justin bieber picture.
-
Why should I trust you, your profile picture is a troll face.
-
Another way to describe it is to its the opposite to "Do Until" (even tho it doesn't exist)
Instead of go out of the loop when the condition returns true, it stops the loop when the condition return false -
Yes.
-
I want your accent
-
thanks bro
very nice -
Do while loops should normally be used for debugging, as they are the source of a lot of bugs in programming.
-
We dont make a " ; " after while() ??
-
lol i bet the police are stalking his house and like as soon as he its record they are like "Big Red move out!" WEEEWOOO
-
The views are dropping more and more with every video! So many people give up π
-
Kind of late but, not exactly for displaying text. However, you could make a Boolean for continuing a web page. And lets say the user does not input his name some where on the page. And the text box's name is "User". And User contains nothing, then stay on the page. If User contains a value then go to the next page. Most of these tutorials are made using very basic concepts.
-
I haven't been hearing sirens for a while…
-
@540veera a while loop will not run at all if the condition is false.
A DO while loop will no matter what run the loop at least once
-
what is diffrence between do while Loop and while loop…?
-
@iinsanebaby text-based output example:
Choose a topping
1 bacon
2 cheese
3 nothing
(user presses 1 or 2)do you want another topping? (in the code this will be right before the line with the "while()" part)
1 yes
2 noif they pic 1 again, it sets the value in "while(value)" to true so that they can add more bacon or cheese
if they pic 2 here or 3 on the first question, it sets the value in "while(value)" to false and the loop is exited when the user is done with it.
I hope that helps
-
thank you Alex. this tutorials can easily change some huge books.
respect -
Can anyone give some examples of where u can apply this???
-
Nice….
Leave a Reply