0

For some reason I’m stuck on this

For some reason I’m stuck on this can I have some help plz?? https://www.sololearn.com/learn/PHP/1831/

23rd May 2020, 7:04 PM
This is junk email
This is junk email - avatar
2 Antworten
+ 4
if the keyword continue is reached in a loop, the execution of the code jumps from there, skipping the remaining code in the loop, to the loops condition (in the case of a for loop it jumps to the increment section then the condition as normal). $x = 0; while($x < 3) { $x++; if($x == 2) { continue; } echo $x."\r\n"; } Outputs 1 3 When $x has the value of 2 the if statement runs and the loop continues by jumping back to the top of the loop skipping the echo statement and checking the condition agian to continue the loop.
23rd May 2020, 8:06 PM
ChaoticDawg
ChaoticDawg - avatar
+ 1
thx
24th May 2020, 5:09 AM
This is junk email
This is junk email - avatar