Quote Originally Posted by bobo View Post
You use while and do...while for conditional looping (you don't know how many times you have to loop). You use switch when you wanna compare 1 variable to a bunch of values (could also be done with a bunch of if...else if). You use break if you want to exit a loop early (I usually put those with a condition). You use return; when you want to exit a function early. I could give you java syntax, but you probably don't want that.
He doesn't really need do{}, I even doubt anyone uses it on graal anyways: (if it works)
PHP Code:
do {
  echo(
temp.i);
  
temp.i++;
} while (
temp.<=5);