Return to Snippet

Revision: 24082
at February 20, 2010 09:44 by rccc


Initial Code
function subval_sort($a,$subkey) {
	foreach($a as $k=>$v) {
		$b[$k] = strtolower($v[$subkey]);
	}
	asort($b);
	foreach($b as $key=>$val) {
		$c[] = $a[$key];
	}
	return $c;
}

Initial URL
http://firsttube.com/read/sorting-a-multi-dimensional-array-with-php/

Initial Description

                                

Initial Title
Sorting a Multi-Dimensional Array with PHP

Initial Tags
php, array

Initial Language
PHP