The question is how to reset key e.g. for an array:
Array (
[1_Name] => Array (
[1] => leo
[4] => NULL
)
[1_Phone] => Array (
[1] => 12345
[4] => 434324
)
)
reset to :
Array (
[1_Name] => Array (
[0] => leo
[1] => NULL
)
[1_Phone] => Array (
[0] => 12345
[1] => 434324
)
)
To reset the keys of all arrays in an array:
$arr = array_map('array_values', $arr);
In case you just want to reset first-level array keys, use array_values()
without array_map
.