Tag Archives: shift

blackboard

Reorder numeric keys of an array from “0″ onwards

Back in the game with another PHP quick tip :) Ever faced the problem of needing to loop through an array but it has non-consecutive numeric keys ? There are some easy ways to reassign array keys from 0 onwards. Supposing that I ...