Ver Mensaje Individual
  #2 (permalink)  
Antiguo 27/11/2008, 13:10
rocaflex
 
Fecha de Ingreso: febrero-2006
Ubicación: Concepcion, Chile.
Mensajes: 10
Antigüedad: 18 años, 3 meses
Puntos: 0
Respuesta: funcion array_multisort

UZA ARREGLOS TEMPORALES...

EJEMPLO

for($i=0; $i < "$numero_arreglos"; $i++)
{
$arreglo_a[$i] = $dato_1;
$arreglo_b[$i] = $dato_2;
$arreglo_c[$i] = $dato_3;
}

$arreglo_temporal_a = $arreglo_a;

array_multisort($arreglo_a, SORT_ASC, $arreglo_b);
array_multisort($arreglo_temporal_a, SORT_ASC, $arreglo_c);

LO QUE SEGUN YO ARIA ESTO ES

... GUARDAS 3 ARREGLOS CON LOS DATOS DE LA MATRIS DE 3
... DUPLICAS LA MATRIZ A... QUE ES EL CRITERIO A ORDENAS
... APLICAS EL CRITERIO DE ORDEN 2 VECES

... LUEGO EL $arreglo_a, $arreglo_b, $arreglo_c ... estan ordenados en criterio de $arreglo_a ... asendente.

Y SI QUIERES VOLVER A REACER TU ARREGLO:

for($i=0; $i < "$numero_arreglos"; $i++)
{
$arreglo_final_ordenado[$i] = array('$arreglo_a[$i]', '$arreglo_b[$i]', '$arreglo_c[$i]');
}


SI TE FUNCIONA MANDAME UN EMIAL ... SALUDOS...