reset php array code example
Example 1: 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 2: reset array keys php
foreach($input as &$val) {
$val = array_values($val);
}