Link to home
Start Free TrialLog in
Avatar of naeemsabasara
naeemsabasaraFlag for India

asked on

Multi dimension array

I have get value of Multi dimension array. how can get is. My array is mentions below. please refer that and please give me a reply.

I need a value of 8,9 so how can get a both value using PHP?


Array
(
    [field_add_title] => Array
        (
            [#theme] => field
            [#weight] => 0
            [#title] => Title
            [#access] => 1
            [#label_display] => above
            [#view_mode] => full
            [#language] => und
            [#field_name] => field_add_title
            [#field_type] => text
            [#field_translatable] => 1
            [#entity_type] => field_collection_item
            [#bundle] => field_adress
            [#object] => FieldCollectionItemEntity Object
                (
                    [fieldInfo:protected] =>
                    [hostEntity:protected] => stdClass Object
                        (
                            [vid] => 84
                            [uid] => 1
                            [title] => Court Locations
                            [log] =>
                            [status] => 1
                            [comment] => 1
                            [promote] => 0
                            [sticky] => 0
                            [ds_switch] =>
                            [nid] => 83
                            [type] => address
                            [language] => und
                            [created] => 1315574149
                            [changed] => 1316232612
                            [tnid] => 0
                            [translate] => 0
                            [revision_timestamp] => 1316232612
                            [revision_uid] => 1
                            [body] => Array
                                (
                                    [und] => Array
                                        (
                                            [0] => Array
                                                (
                                                    [value] =>
Content Display Here...

                                                    [summary] =>
                                                    [format] => full_html
                                                    [safe_value] =>


Content Display Here...
 


                                                    [safe_summary] =>
                                                )

                                        )

                                )

                            [field_adress] => Array
                                (
                                    [und] => Array
                                        (
                                            [0] => Array
                                                (
                                                    [value] => 8
                                                )

                                            [1] => Array
                                                (
                                                    [value] => 9
                                                )

                                        )


                                )
Avatar of Scott Madeira
Scott Madeira
Flag of United States of America image

Perhaps something like:

$variable['field_add_title']['#object']->hostEntity->field_address[und][0]['value']

$variable['field_add_title']['#object']->hostEntity->field_address[und][1]['value']
ASKER CERTIFIED SOLUTION
Avatar of Ray Paseur
Ray Paseur
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial