PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
do..while has been there for decades.
Even QBasic has it as DO..LOOP WHILE or DO...LOOP UNTIL
C/C++ had do...while since the beginning
PHP's programming structure is very much like C++ and this has been there right from the first version I guess since PHP is the new language.
Many people use this including me.
This is used when you want a loop to take place ateleast once irrespective of the condition.
anjanesh wrote:do..while has been there for decades.
Even QBasic has it as DO..LOOP WHILE or DO...LOOP UNTIL
C/C++ had do...while since the beginning
PHP's programming structure is very much like C++ and this has been there right from the first version I guess since PHP is the new language.
Many people use this including me.
This is used when you want a loop to take place ateleast once irrespective of the condition.
Yeah I know what it does I just never seen it used in PHP LOL..
do...while isn't taught (either in the classroom or in books) as much as a plain while loop. So people , when thinking of algorithms, usually don't develop their logic in ways that would utilise a do...while loop.
I've honestly only used it twice in 3 years.
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
I have known about it for quite some time, but have never actually used it in any software. Although I've seen it a lot, the time never arises when I truly need it
d11wtq wrote:I'm a n00b (at least Jcart calls me a n00b Razz)