0

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
                            [mode] => NONSSL
                            [get] => Array
                                (
                                    [id] => 31
                                )
                        )
                )
        )

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

1
  • thanx Col. i was about to edit Commented Jun 7, 2010 at 6:55

1 Answer 1

3

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.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.