开发者

how to echo/access the 'get' index of the given array in PHP syntax

开发者 https://www.devze.com 2023-01-02 18:11 出处:网络
I have the array variable say $value, and it has the below given array [navigation] => navigationHistory Object

I have the array variable say $value, and it has the below given array

[navigation] => navigationHistory Object
        (
            [path] => Array
                (
                    [0] => Array
                        (
                            [page] => order_form.php
          开发者_Python百科                  [mode] => NONSSL
                            [get] => Array
                                (
                                    [id] => 31
                                )
                        )
                )
        )

how to echo/access the 'get' index of the given array in PHP syntax


Considering $value is an array and $value['navigation'] is an object:

echo $value['navigation']->path[0]['get']['id'];

That is, only if navigationHistory::$path is public.

If not, see the class definition for navigationHistory to see if it doesn't have a getter for the field path.

0

精彩评论

暂无评论...
验证码 换一张
取 消