[PHP] Sorting array based on key string

2002-07-18 Thread Peter J. Pieczora
Pardon my sloppy explanation but here it is: how can i sort an array based on key element ie. key values are: a1, a2 ,a3 ..., b1, b2 ,b3, ...c1, c1, c3... so doing this: while (list($k, $v) = each($data)) { for ($i=0; $icount($k); $i++) { echo $k[0] = $v\nbr; } will list all the $k $v . a = foo

RE: [PHP] Sorting array based on key string

2002-07-18 Thread Martin Towell
19, 2002 5:35 AM To: [EMAIL PROTECTED] Subject: [PHP] Sorting array based on key string Pardon my sloppy explanation but here it is: how can i sort an array based on key element ie. key values are: a1, a2 ,a3 ..., b1, b2 ,b3, ...c1, c1, c3... so doing this: while (list($k, $v) = each($data