[JAVASCRIPT CODERS] Help

Discussion in 'Mobile Web Development' started by The Ax, Jul 30, 2008.

  1. The Ax

    The Ax Banned

    Joined:
    Mar 11, 2008
    Messages:
    647
    Likes Received:
    22
    I want to reverse an array for an application I want to make!

    Here's what i believe the array looks like
    PHP:
    <script type="text/javascript">

    function 
    sortNumber(ab)
    {
    return 
    b;
    }

    var 
    arr = new Array(6);
    arr[0] = "10";
    arr[1] = "5";
    arr[2] = "40";
    arr[3] = "25";
    arr[4] = "1000";
    arr[5] = "1";

    document.write(arr "<br />");
    document.write(arr.sort(sortNumber));

    </script>
    I want it to do the opposite and sort the numbers into variables.
    heres the array i want transformed

    PHP:
    http://hiscore.runescape.com/index_lite.ws?player=grimmstriker

    ------------------double post merged------------------
    The website displays as:

    PHP:
    76,2362,1190152445
    185
    ,99,58119240
    109
    ,99,55033214
    324
    ,99,37951667
    65
    ,99,59769679
    80
    ,99,37071364
    223
    ,99,14138280
    9
    ,99,61575280
    5
    ,99,200000000
    1012
    ,99,22079278
    16
    ,99,104689398
    161
    ,99,27234122
    9
    ,99,116979706
    545
    ,99,13612112
    74
    ,99,17549846
    256
    ,99,15759831
    4
    ,99,51449927
    327
    ,99,13539652
    5
    ,99,200000000
    158
    ,99,18636464
    118
    ,99,19316023
    235
    ,99,15967700
    2860
    ,99,13145163
    187
    ,99,13225842
    2119
    ,85,3308657
    2366
    ,1944
    -1,-1
    -1,-1
    -1,-1

    Please if you have any knowledge of any web code please help!

Share This Page