Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- How does this code work?
- Raistlin Majere
March 6, 2008, 1:13 am
rate this thread
$descending = false
$sortArr = array();
foreach ( $original as $key => $value )
$sortArr[ $key ] = $value[ $field ];
if ( $descending )
arsort( $sortArr );
asort( $sortArr );
$resultArr = array();
foreach ( $sortArr as $key => $value )
$resultArr[ $key ] = $original[ $key ];
Re: How does this code work?
In reply to Your message dated Thursday, March 6, 2008, 04:13:40,
Do Your homework/practice for Yourself, please.
It clearly looks like a teaching class task and I have no doubt it is.
If You have problem in understanding this code - ask Your teacher about it.
- » [sort of OT, but relevant] is the browser the new os / operative system ?
- — Previous thread in » PHP Scripting Forum