How to reindex an array in php
By liviu - Posted on May 22nd, 2009
Tagged:
If you have an array and want to reindex it to have the keys starting from 0 and be consecutive, you can use array_values, which does just that.
You can use it when lets say you want to iterate through it with a for (and not a foreach).
Bookmark/Search this post with:
- liviu's blog
- Login or register to post comments
Delicious
Digg
StumbleUpon
Propeller
Reddit
Magnoliacom
Newsvine
Furl
Facebook
Google
Yahoo
Technorati
Icerocket