Clave de matriz indefinida después de unset ()

//When unset() is used it unsets the array keys. 
//To reset the keys of an array you can use the array_merge(). 
//It's like magic
 
$array = array('a', 'b', 'c', 'd'); 
unset($array[2]); 

$array = array_merge($array);

Ill Iguana