} while($mail < 500000); and } while($mail < 2); is same if you don't increment the variable.