Jump to content

Get data from this array...


Crimpage

Recommended Posts

Hi Everyone,

 

I have data in an array that looks like this:

 

Array
(
    [Adelaide] => Array
        (
            [Agriculture] => Array
                (
                    [CHAT. MTGE] => Array
                        (
                            [amtfinanced] => VALUE
                            [numberofdeals] => VALUE
                            [brokerage] => VALUE
                            [docfee] => VALUE
                        )

                )

            [Transport & Storage] => Array
                (
                    [CHAT. MTGE] => Array
                        (
                            [amtfinanced] => VALUE
                            [numberofdeals] => VALUE
                            [brokerage] => VALUE
                            [docfee] => VALUE
                        )

                )

            [Agriculture,Forest & Fishing] => Array
                (
                    [LEASE] => Array
                        (
                            [amtfinanced] => VALUE
                            [numberofdeals] => VALUE
                            [brokerage] => VALUE
                            [docfee] => VALUE
                        )

                    [CHAT. MTGE] => Array
                        (
                            [amtfinanced] => VALUE
                            [numberofdeals] => VALUE
                            [brokerage] => VALUE
                            [docfee] => VALUE
                        )

                )
        )
)

 

And what I need to do, is get the values of the Office Name (Brisbane), Industry (Agriculture), Product(Chat. MTGE), then the values for amt finance, num deals, brokerage, docfee...

The info is a report grouped by office, industry then product and I basically just need to get it into Excel. You can see there is a main array (Office), then under that it has an array for each industry, then an array for each product, then the total values will be in there. I also need to get the array key values as these are dynamic and will change.

 

Any ideas would be great. The structure of the array won't change.

 

Cheers,

Dave.

Link to comment
https://forums.phpfreaks.com/topic/62974-get-data-from-this-array/
Share on other sites

Hi,

 

Thanks for the quick reply. I also need to get the array key values as these are dynamic.

 

Basically for each row in Excel I will need:

 

Office - Industry - Product - AmtFinanced - NumberofDeals - Brokerage - DocFee

 

Which should look like:

 

Adelaide - Agriculture - Chat. MTGE - $5,000 - 1 - $200 - $50

Adelaide - Agriculture - HP              - $10,000 - 2 - $500 - $200

 

and so on...

 

Cheers,

Dave.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.