Answers for "reindex array php"

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

Browse Popular Code Answers by Language