Forums
This topic is locked
Sorting array values?
12 Nov 2001 10:07:29 Bec C posted:
I have a hidden field which holds multiple values passed as the user clicks through pages.On getting to a results page I split this field into many values as an array (using the split "," method)
hidden field = answer1, answer2, answer2, answer3
An array may look like this:
varArray(0) = "answer1"
varArray(1) = "answer2"
varArray(2) = "answer2"
varArray(3) = "answer3"
How do I stack these individual values in the most occuring first e.g.
answer2 at the top as it appears twice
answer1
answer3 below?
Is there a way to sort to put the most found at the top?
Any guidance would be great!