$array = array('1','3','20','10');
foreach ($array as $i=>$arr) {
if ($i==0) unset($array[$i]);
}
Question: would removing one element mess up the order of the iteration of this loop? What happen when I remove the element with the index smaller/equal/bigger than the current iterating index?
What should I avoid to do when modifying the original array while iterating over it?
Edit: In case the array is passed by reference?