Sort data using sort function or sort as retrieved from database?
I have a list of teams with corresponding scores.

`$name[$i] ` contains the names while `scores[$i]` contains the corresponding scores

I need to sort the teams by score while maintaining a scores association with it's corresponding team name. 

I am wondering is it best to create a multidimensional array such as
`$teaminfo[$name][$score]` and use a sort function or am I better off 
sorting the data as it is grabbed from the database using sql?

Does it even matter which way? I am looking for the simplest way.
Sort data using sort function or sort as retrieved from database?
===

I have a list of teams with corresponding scores.

`$name[$i] ` contains the names while `scores[$i]` contains the corresponding scores

I need to sort the teams by score while maintaining a scores association with it's corresponding team name. 

I am wondering is it best to create a multidimensional array such as
`$teaminfo[$name][$score]` and use a sort function or am I better off 
sorting the data as it is grabbed from the database using sql?

Does it even matter which way? I am looking for the simplest way.