[thelist] PHP 2D array sort

Bigpant bigpant at btinternet.com
Tue May 21 05:30:01 CDT 2002

I am trying to sort a 2 dimensional array in PHP.

$a = array(array (
			"text" => "",
			"qty" => 0
$a['text'][0] = "two";
$a['qty'][0] = 2;

$a['text'][1] = "one";
$a['qty'][1] = 1;

I want to order $a['text'] by $a['qty'], but the sort functions don't
appear to have facility for this. Do I have to build my own bubble sort?


More information about the thelist mailing list