Sorting array data by week day order

From: Date: Wed, 21 May 2003 23:08:38 +0000
Subject: Sorting array data by week day order
Groups: php.general 
Request: Send a blank email to php-general+get-148466@lists.php.net to get a copy of this message
Hi, I have an array as below. Array ( [jord] => Array ( [Monday] => 1 [Tuesday] => 3.5 [Thursday] => 8.25 [Wednesday] => 0 [Friday] => 0 ) [madeup] => Array ( [Wednesday] => 1 [Monday] => 0 [Tuesday] => 0 [Thursday] => 0 [Friday] => 0 ) [marie] => Array ( [Tuesday] => 3 [Wednesday] => 6.25 [Thursday] => 1.25 [Friday] => 3 [Monday] => 0 ) ) It's an array of users and the amount of hours they have done in a working week. I am plotting the data to a graph using jpgraph and so need to data in day order. Is there a way to sort the data so I end up with this: Array ( [jord] => Array ( [Monday] => 1 [Tuesday] => 3.5 [Wednesday] => 0 [Thursday] => 8.25 [Friday] => 0 ) [madeup] => Array ( [Monday] => 0 [Tuesday] => 0 [Wednesday] => 1 [Thursday] => 0 [Friday] => 0 ) [marie] => Array ( [Monday] => 0 [Tuesday] => 3 [Wednesday] => 6.25 [Thursday] => 1.25 [Friday] => 3 ) ) TIA, Jord -- Jordan Elver Set out to leave the first vapour trail in the blue-sky scenario. -- David Brent (The Office)

« previous php.general (#148466) next »