Help with Array
| From: | RealGM Webmaster | Date: | Mon, 11 Dec 2000 10:03:30 +0000 |
| Subject: | Help with Array | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-29653@lists.php.net to get a copy of this message | ||
Hi,
I have not gone into arrays in any great detail but I have a slight problem.
I have two groups of people into memory variables, but the person's name and a corresponding
number. I need to "merge" these groups into an array, sort the data by the number, then
output into a different memory variable (name only).
For instance, I have $personA1 and $personAnumber1 ... $personA7 and $personAnumber7. PersonB only
goes up to six, giving me a total of 13 people combined.
I want to enter both of these details into an array, sort it by the second value (number), then
output the first value only (name) to a new variable $person1, $person2, etc.
I presume this would be simple but I get confused with arrays. Could someone please help?
Thanks,
Michael