开发者

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

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜