PHP: go back to the start of loop using a sort of 'break' ?
- by matthy
Hi i have a loop and i was wondering if there was a command that you can jump back to the start of the loop and ignore the rest of the code in the loop
example:
for ($index = 0; $index < 10; $index++)
{
if ($index == 6)
that command to go the start of the loop
echo "$index, ";
}
should output
1,2,3,4,5,7,8,9
and skip the six
sort of same result as
for ($index = 0; $index < 10; $index++)
{
if ($index != 6)
echo "$index, ";
}
is there a command for that?
thanks,
matthy