0

I have an array like this (this example shows only key 0, there are more than one key):

Array
(
    [0] => Array
        (
            [additional] => Array
                (
                    [contact_detail] => Array
                        (
                            [adr] => Array
                                (
                                    [0] => Array
                                        (
                                            [data] => Array
                                                (
                                                    [city] =>
                                                    [country] => 
                                                    [extended] => 
                                                    [post_office_box] => 
                                                    [postal_code] =>
                                                    [region] => 
                                                    [street] => 
                                                )

                                            [is_readonly] => 
                                        )

                                )

                            [full_name] => 
                            [mail] => Array
                                (
                                    [0] => Array
                                        (
                                            [data] => 
                                            [is_readonly] => 
                                        )

                                )

                            [name] => Array
                                (
                                    [additional_name] => 
                                    [family_name] => 
                                    [given_name] => Max
                                    [prefix] =>
                                    [suffix] => 
                                )

                            [note] => 
                            [photo] => 
                            [tel] => Array
                                (
                                    [0] => Array
                                        (
                                            [data] =>
                                            [is_readonly] => 
                                        )

                                )

                            [title] => 1234
                        )

                    [label] => Array
                        (
                            [0] => Array
                                (
                                    [color] =>
                                    [id] => 
                                    [name] =>
                                    [type] =>
                                )

                        )

                )

            [addressbook_id] =>
            [company] => 
            [department] => 
            [full_name] =>
            [id] =>
            [is_editable] =>
            [is_hidden] => 
            [photo] => 
            [primary_mail] =>
            [primary_tel] =>
            [title] =>
            [usage_frequency] =>
        )
)

How can I found the key of this array, where given_name == max or title == 1234? I didn't found an working example yet :(

Trombone0904
  • 4,132
  • 8
  • 51
  • 104

0 Answers0