Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

php array start with index 0

//If you want to re-index starting to zero, simply do the following:
$iZero = array_values($arr);

//If you need it to start at one, then use the following:
$iOne = array_combine(range(1, count($arr)), array_values($arr));
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #php #array #start #index
ADD COMMENT
Topic
Name
8+5 =