I’m running this code and I got this error.
$no=0;
out:for($i=0;$i<count($r);$i++){
foreach ($r as $q){
if($no++>$noOfQuestion)break out;
}
}
This is my error
'break' operator with non-constant operand is no longer supported
I’m running php 5.4.3.
Use
break 2;instead ofbreak out;.