Results 1 to 2 of 2

Thread: Sort a 2-dimensional array

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Jun 2004
    Posts
    369

    Sort a 2-dimensional array

    Hi,

    I am very new to PHP and wonders if a built-in PHP function could do the trick. From what I read the many post, I just can't do it.

    I have a 2-dimensional array of dimension $teamlist[25][7]

    $teamlist[0][0] = team name
    $teamlist[0][1] = game played
    $teamlist[0][2] = wins
    $teamlist[0][3] = losses
    ... etc

    How would I sort that array by "Game Played" or "Losses" ... etc etc.

    Thanks for helping.

  2. #2
    Lively Member Spetnik's Avatar
    Join Date
    Jan 2002
    Posts
    121

    Re: Sort a 2-dimensional array


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width