NYCPHP Meetup

NYPHP.org

[nycphp-talk] multi dimension array sort?

Nestor Florez nestorflorez at earthlink.net
Tue Jun 10 13:43:09 EDT 2003


I was using the example in the documentation but 
one of them is wrong.

This is the way I made it work for me.

              //Sort on 'Dep_Name'
              foreach ($rows as $val) 
	      {
                $sortarray[] = $val['Dept_Name'];
              }
              
              //this will osrt your multi associative aray by the
              //column heading you specified
              array_multisort($sortarray, $rows);

Thanks for all the help,

Nestor :-)



More information about the talk mailing list