Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

reindex array php

# starts from 0
$iZero = array_values($arr);
# starts from 1
$iOne = array_combine(range(1, count($arr)), array_values($arr));
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #reindex #array #php
ADD COMMENT
Topic
Name
9+3 =