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.

UnkwnTech
  • 83,811
  • 65
  • 181
  • 226

0 Answers0