while($condition) { # do something $condition = 0; # Make sure condition is false at the end }