Revision: 53474
Initial Code
Initial URL
Initial Description
Initial Title
Initial Tags
Initial Language
at November 24, 2011 06:31 by n19ht
Initial Code
function orderMultiDimensionalArray ($toOrderArray, $field, $inverse = false) { $position = array(); $newRow = array(); foreach ($toOrderArray as $key => $row) { $position[$key] = $row[$field]; $newRow[$key] = $row; } if ($inverse) { arsort($position); } else { asort($position); } $returnArray = array(); foreach ($position as $key => $pos) { $returnArray[] = $newRow[$key]; } return $returnArray; }
Initial URL
Initial Description
Ordena cualquier array multidimensional en base a un campo especÃfico
Initial Title
Ordenar Array Multidimensional PHP
Initial Tags
php, sort, array, order
Initial Language
PHP