[UPHPU] easy asort() question
johnm_ul at yahoo.com
Tue Jun 21 16:58:46 MDT 2005
I'm going through some examples on the different sort
functions and asort has me a bit confused. It's not
sorting like I think it should be.
...and the way I understand it is that it is supposed
to be sorted by value and not index.
The code I've typed in is sorting by index and then
Here is the code I've typed in...
while (list($index,$value) = each($math))
$gradestudent = $math[$index].$student[$index];
The result I get is...
albert einstein - Grade B
isaac newton - Grade B
simon bolivar - Grade B
ivan the terrible - Grade C
napoleon - Grade C
Is my understanding of asort wrong? (Let me know if
you need me to post the rest of this code)
Yahoo! Mail Mobile
Take Yahoo! Mail with you! Check email on your mobile phone.
More information about the UPHPU