Advanced Array Help
- From: tpost44@xxxxxxxxxxx
- Date: 27 Jan 2006 23:00:24 -0800
I have an array of values that I want to be able to report on based on
a hierarchy:
[0] =>
array(3) {
["Hardware"] => "Desktop PC"
["Vendor"] => "IBM"
["Model"] => "123"
[1] =>
array(3) {
["Hardware"] => "Desktop PC"
["Vendor"] => "IBM"
["Model"] => "234"
[2] =>
array(3) {
["Hardware"] => "Laptop"
["Vendor"] => "IBM"
["Model"] => "456"
[3] =>
array(3) {
["Hardware"] => "Desktop PC"
["Vendor"] => "Dell"
["Model"] => "567"
[4] =>
array(3) {
["Hardware"] => "Desktop PC"
["Vendor"] => "IBM"
["Model"] => "123"
I want to be able to create a report like this using a data set similar
to the above array:
Desktop PC -4
IBM - 3
123 - 2
234 - 1
456 - 1
Dell - 1
567 - 1
Laptop - 1
IBM - 1
456 -1
So basically it is a tree, but keeps track of a count for each node, as
some entries may be duplicates.
.
- Follow-Ups:
- Re: Advanced Array Help
- From: Mike Willbanks
- Re: Advanced Array Help
- Prev by Date: Adding GD to php in Windows XP
- Next by Date: want a back button to get to the last page...
- Previous by thread: Adding GD to php in Windows XP
- Next by thread: Re: Advanced Array Help
- Index(es):