if ($item_fuera){ foreach($itemsEnCesta as $k => $v) { if ($item_fuera==$k){ array_slice($itemsEnCesta[$k]); } } }