Answers for "php reindex array from 1"

PHP
0

reindex array php

# starts from 0
$iZero = array_values($arr);
# starts from 1
$iOne = array_combine(range(1, count($arr)), array_values($arr));
Posted by: Guest on June-07-2021

Code answers related to "php reindex array from 1"

Browse Popular Code Answers by Language