Merging arrays...
| From: | Wachaca | Date: | Tue, 25 Jul 2000 22:06:51 +0000 |
| Subject: | Merging arrays... | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-8150@lists.php.net to get a copy of this message | ||
Hello,
I have 2 arrays, which are results from 2 different SQL commands.
I was wondering how I could "merge" these 2 into one.
The arrays have one field which I would like to add.
For example
array1 would have
user1 4
user2 3
array2 would have
user1 7
user3 9
So the final array which I want to create would have
user1 11
user3 9
user2 3
The new array would be sorted by size of field 2.
Thanks,
WIT
PS. Please reply to my email address since I cannot handle the volume on this mailing list.