| Johannes Wienke 2006-03-14, 7:55 am |
| Am 13.03.2006 01:13 schrieb Abhi:
> Hi!
>
> I am wondering if someone can point me to the needed sort function. There are so many of
> them that I simply got lost by reading their descriptions. I try to explain what I need.
>
> I have a multidimensional array and I have a function that outputs it as a table.
>
> $arr[0] contains an array that contains usernames
> $arr[1] contains an array that contains real names
> $arr[2] contains an array that contains e-mails
> etc...
> $arr[last] contains integers for users "levels"
I'm wondering why to use such a silly construction. It would me much
easier if you do it like this:
$array['useridorsthelse'] = array('name' => 'foobar', 'email' => 'blaa'...)
> My function outputs users with their datas in the columns. Each column means one user.
>
> Now I want to sort this whole array by levels. So, all other data should be sorted
> according to the pattern in levels row.
I think you should change your structure like I explained. The it should
be much easier to sort.
|