0

I've seen both the blocks of code in use several different times, personally I have always used the first but my question is: is there a functional difference, and if there is what is it?

while (condition is true ) {
    // do something
}
do {
    // do something
} while ( condition is true);

I will be applying this to PHP but I assume this is fairly language agnostic.

0

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.