While
The following samples demonstrate the while loop. Counting from 1 to 10 and printing the number.
$i = 1; while ($i <= 10) { echo $i; $i++; }
PHP Manual, Control Structures
i = 1
while i <= 10:
print i i += 1