Sign in to follow this  
Followers 0
armenfrast

Array_sort (I need a little help)

3 posts in this topic

#1 ·  Posted (edited)

Bonjour,

Hello,

Je recherche un peu d'assistance sur le mode de fonctionnement de la fonction array_sort

I need a little help with the function Array_sort

Je souhaite trier l'array suivant

i would like to sort the following array

$classement[$i][2]

où $i est l'index de l'enregistrement (la saisie initiale est séquentielle)

where $i is the index number of the entry (the initial entry is sequential)

par hypothèse $i=100

Tel que / such as

$position[$i][0] = N° d'identifiant unique (Unique ID number)

$position[$i][1] = Score

A l'origine j'ai donc le tableau suivant

Initially I have the following array

|ID |Score

$i [0] [1]

1 |172 |80

2 |82 |53

3 |9 |93

4 |70 |66

5 |47 |87

6 |91 |66

etc…

Je voudrais disposer du tableau suivant

I would like to obtain the following array (sorted by Score)

|ID |Score

$i [0] [1]

1 |9 |93

2 |47 |87

3 |172 |80

4 |70 |66

5 |91 |66

6 |82 |53

etc…

NB: Pour l'égalité je n'ai pas de préférence pour l'ordre de classement.

NB: Regarding the matches I have no preference for their sort order.

Merci

Edited by armenfrast

Share this post


Link to post
Share on other sites



Thank you

that was much more simple than what I thought.

Those UDF lack a good tutorial explaining their functions and how to use them.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0