alex.chacon@terra.com
Hi
Here there is a function that delete a
elemente from a array and re calculate
indexes
<?php
function eliminarElementoArreglo ($array,
$indice)
{
if (array_key_exists($indice, $array))
{
$temp = $array[0];
$array[0] =
$array[$indice];
$array[$indice] =
$temp;
array_shift($array);
//reacomodamos
韓dices
for ($i = 0 ; $i < $indice ; $i++)
{
$dummy =
$array[$i];
$array[$i] = $temp;
$temp =
$dummy;
}
}
return $array;
}
?>