<?php
for ($i=0; $i<count($big_array); $i++){
//
}
?>
Having this approach, program will try to count the $big_array every time it loops and it may cause some performance issues. To make it more efficient, we should code it this way:
<?php
for ($i=0, $n=count($big_array); $i<$n; $i++){
//
}
?>
It does the counting during initialization only.