php array reset code example
Example 1: php reset array keys
$arr = array_values($arr)
Example 2: clear array php
//To clear array you are able to simply re-instantiate it
$foo = array();
//To clear $foo from the symbol table use
unset($foo);
Example 3: php remove array element reset keys
unset($foo[0]); // remove item at index 0
$foo2 = array_values($foo); // 'reindex' array