Order from highest to lowest
#2

If you meant values in an array you can easily sort them in descending order.There are lot of sorting methods available.I will show you simple sorting technique (Linear sort)
PHP код:
new i,j,a;    
for (
0sizeof(number);i++)
    {
        for (
1sizeof(number); j++)
        {
            if (
number[i] < number[j])//to sort in reverse (ascending change < to >) 
            
{
                
number[i];
                
number[i] = number[j];
                
number[j] = a;
            }
        }
    } 
There are also more optimized algorithms for sorting like insertion,bubble,shell etc.You can ****** about it
Reply


Messages In This Thread
Order from highest to lowest - by GranaT3 - 05.11.2016, 22:42
Re: Order from highest to lowest - by SyS - 06.11.2016, 00:25
Re: Order from highest to lowest - by SickAttack - 06.11.2016, 01:24
Respuesta: Order from highest to lowest - by GranaT3 - 06.11.2016, 01:34

Forum Jump:


Users browsing this thread: 1 Guest(s)