无法在PHP中访问数组值

时间:2017-05-09 20:01:20

标签: php multidimensional-array

我需要在下面的数组转储中抓取[value]

我可以获取[name]的值,但不知道如何到达数组中的数组[field_model_display_name]

       foreach ($taxonomy_names as $taxonomy_name){

            $display = $taxonomy_name->name;
            $api_options[$taxonomy_name->name] = $display;
       }

此代码让我02072017-aprm-222。如何设置显示名称02072017 APRM 222

Array
(
[436] => stdClass Object
    (
        [tid] => 436
        [vid] => 5
        [name] => 02072017-aprm-222
        [description] => desc
        [format] => 
        [weight] => 0
        [vocabulary_machine_name] => smartdocs_models
        [field_model_display_name] => Array
            (
                [und] => Array
                    (
                        [0] => Array
                            (
                                [value] => 02072017 APRM 222
                                [format] => 
                                [safe_value] => 02072017 APRM 222
                            )

                    )

            )

0 个答案:

没有答案