while: The loop will execute continuously until a condition is met.
Example 1:
<?php
$loop=1
while($loop <= 10)
{
echo "number is $loop<br>";
$loop++;
}
?>
Example 2:
<?php
for($counter=1, counter<=10; $counter++)
{
echo "counting: $counter<br>;
}
?>