php reset array keys
snippet in php

php reset array keys

user6466

$arr = array_values($arr)

reset array keys php

user7367

foreach($input as &$val) {
   $val = array_values($val);
}

php remove array element reset keys

user5835

unset($foo[0]); // remove item at index 0
$foo2 = array_values($foo); // 'reindex' array