Array Sort Problem

Discussion in 'PHP' started by Pudge1, Mar 4, 2010.

  1. #1
    So I have this array that is made up of the following things.

    300|User2
    301|User3
    ...
    309|User11
    1000|User12

    What I did is used sort to sort them numerically and then reverse_array to make it go in numerical order then I displayed the first 10 items. It displays the ones that start with the 3 before the ones that start with the 1000 even though 1000 is bigger. What way should I use to sort it so it displays it from largest to smallest number regardless of what the first digit of the number is?
     
    Pudge1, Mar 4, 2010 IP
  2. Pudge1

    Pudge1 Well-Known Member

    Messages:
    912
    Likes Received:
    6
    Best Answers:
    1
    Trophy Points:
    140
    Digital Goods:
    1
    #2
    Nevermind SORT_NUMERIC solved the problem.
     
    Pudge1, Mar 4, 2010 IP