The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
Loading Contents of a File -> Sorting everything?
You guys have helped me countless times before.. and yet again, I come to you for a little kick in the right direction.
Let's say we have a text file with the following: (in the order of: name id, name title, number people with name, name description) Code:
01 Name #1 4 This name is number one. 02 Name #2 8 This name is number two. 03 Name #3 0 This name is number three. 04 Name #4 3 This name is number four. Now keep in mind I already have a for() outputting this file fine and I'm exploding the \t's.. as the large spaces are tabs if you haven't already guessed. Within the for(), I'm able to use $value[1], $value[2], $value[3], $value[4].. to display where ever I want, granted. But now here comes the question. How can I have PHP load this file and sort the "number of people with this name" in a descending order, having everything else associated with the number of people. Example wanted output below: Name #2 has 8 people in it. It's description is "This name is number two." Name #1 has 4 people in it. It's description is "This name is number one." Name #4 has 3 people in it. It's description is "This name is number four." Name #3 has 0 people in it. It's description is "This name is number three." Any ideas? |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|