What is the difference between while and do...while in php
This article mainly introduces the php while and do...while have what different related knowledge, the content is detailed and easy to understand, simple and fast operation, has a certain reference value, I believe that you read this php while and do...while have any different articles will have a harvest, let's take a look at it.
1. Different conditions of use
The functions of do...while and while are similar, except that while judges first and then executes, while do...while executes first and then judges.
Do...while can guarantee that the loop body executes at least once, while while cannot.
two。 Cyclic diagram
3. Example
# include int main () {int iMagne sum = 0position printf ("please enter iMagna iMagneur?"); scanf ("% d", & I); while (I)