Jump to content

[SOLVED] multi dimensional array help


robcrozier

Recommended Posts

Hi.

 

I wonder iof anyone can point me in the right direction with this?  Basically i have the following array structure:

 

Array
(
    [GetAllProductGroupCategoriesResult] => Array
        (
            [ProductGroupCategory] => Array
                (
                    [0] => Array
                        (
                            [ProductGroupID] => BVID
                            [ProductGroup] => Books and Videos
                            [CategoryID] => BVBO
                            [CategoryName] => Books
                        )

                    [1] => Array
                        (
                            [ProductGroupID] => BVID
                            [ProductGroup] => Books and Videos
                            [CategoryID] => MIP
                            [CategoryName] => MIP
                        )

                    [2] => Array
                        (
                            [ProductGroupID] => BVID
                            [ProductGroup] => Books and Videos
                            [CategoryID] => PMUS
                            [CategoryName] => Printed Music
                        )
                )

        )

)

 

... and what i want to do is loop through the array and print out each CategoryName and possibly CategoryID.  I just cxant get my head around it as the array is multi dimensional.  Can anyone help me with this one?

 

Cheers!

Link to comment
https://forums.phpfreaks.com/topic/151749-solved-multi-dimensional-array-help/
Share on other sites

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.