Jump to content

sorting a multidimensional array


karldesign

Recommended Posts

Hey,

 

I Have an array set as so:

 

$temparr[$i]['score'] = 3.4

$temparr[$i]['id'] = 1

$temparr[$i]['title'] = 'title'

 

$i loops the array populating it, but when I output the array, i would like to sort it by the 'score' value asc or desc, depending on what i want to show... what is the easiest way of achieving this?

Link to comment
https://forums.phpfreaks.com/topic/69309-sorting-a-multidimensional-array/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.