09
Dec
Break Vs Continue in PHP
in PHP
Comments
Break Stops the Execution in PHP
For example: ( will Out put : 01 , execution stops after $i==2)
for($i=0;$i<$length;$i++): if($i==2): break; echo $i; endfor;
Continue skip the Operation in PHP ( will Out put : 0134 as it skip 2)
for($i=0;$i<$length;$i++): if($i==2): continue; echo $i; endfor;