tags:

views:

30

answers:

1

Hi guys.. ok so i have the following array:

0 - 208533

1 - 208523

2 - 208522

3 - 208572

4 - 208518

5 - 208501

6 - 208534

7 - 208499

All i need is a quick function that'll start the array key at 1 rather than 0.

eg: 1 - 208533 etc

Any ideas?

Thanks!

+3  A: 

Well one quick way to do it is:

array_unshift($array, null); // inject a dummy value at beginning
unset($array[0]); // unset the dummy value, the rest of the keys are preserved
reko_t