These work the same as do while loops only they execute until the condition evaluated is true
Here's a quick example:
This is executes once and prints out $value;
5
Then $value is decremented and becomes 4
since 4<=10 is true execution of the loop is terminated
Now onto the exciting world of for loops
Here's a quick example:
$value=5; do{ print "$value\n"; $value=$value-1; } until($value<=10);
This is executes once and prints out $value;
5
Then $value is decremented and becomes 4
since 4<=10 is true execution of the loop is terminated
Now onto the exciting world of for loops
Back to
Tutorials