php - Determining if next iteration is going to happen -
i have php script loops many times. there way in php tell whether last iteration ? script rather complex (1700 lines) , can't locate snippet responsible running script beginning.
ideally i'm looking function (put in end of file) predicts whether or not script going run again beginning (as does). sure, other solutions welcomed. amount of iteration depends.
upd: sorry, it's not loop causes script start over. there else (that can't define) makes page run beginning.
i assume mean this:
$max = 10; for($i = 0; $i <= $max; $i++) { if($i == $max) { //last iteration } }
Comments
Post a Comment