Get the value from $node inside two objects I have an array output like this from drupal, how do I access the value of [name] from 
field_episode_tags, I have this so far

print $node-&gt;field_episode_tags['und']['0']['taxonomy_term']-&gt;['name']


When I get up to 'taxonomy term' there is another object i tried using another -> poitner but that did not work.

stdClass Object
    (
        [vid] =&gt; 25
        [uid] =&gt; 1
        [title] =&gt; Is there any cosmos theory?
        [log] =&gt; 
        [status] =&gt; 1
        [comment] =&gt; 1
        [promote] =&gt; 0
        [sticky] =&gt; 0
        [nid] =&gt; 25
        [type] =&gt; tv_episode
        [language] =&gt; en
        [created] =&gt; 1380610491
        [changed] =&gt; 1381115053
        [tnid] =&gt; 0
        [translate] =&gt; 0
        [revision_timestamp] =&gt; 1381115053
        [revision_uid] =&gt; 1
        [body] =&gt; Array
            (
                [und] =&gt; Array
                    (
                        [0] =&gt; Array
                            (
                                [value] =&gt; summary text summary text summary text summary text summary text summary text summary text summary text summary text summary text summary text summary text summary text summary text summary text summary text summary text summary text summary text summary text summary text summary text summary text summary text summary text summary text summary text summary text summary text summary text summary text summary text summary text summary text summary text summary text summary text summary text summary text 
                                [summary] =&gt; 
                                [format] =&gt; filtered_html
                                [safe_value] =&gt; &lt;p&gt;summary text summary text summary text summary text summary text summary text summary text summary text summary text summary text summary text summary text summary text summary text summary text summary text summary text summary text summary text summary text summary text summary text summary text summary text summary text summary text summary text summary text summary text summary text summary text summary text summary text summary text summary text summary text summary text summary text summary text&lt;/p&gt;

                                [safe_summary] =&gt; 
                            )

                    )

            )

        [field_video_category] =&gt; Array
            (
                [und] =&gt; Array
                    (
                        [0] =&gt; Array
                            (
                                [tid] =&gt; 25
                            )

                    )

            )

        [field_featured] =&gt; Array
            (
            )

        [field_kaltura_video] =&gt; Array
            (
            ) und 0 taxonomy term-&gt;name

        [field_episode_tags] =&gt; Array
            (
                [und] =&gt; Array
                    (
                        [0] =&gt; Array
                            (
                                [tid] =&gt; 95
                                [taxonomy_term] =&gt; stdClass Object
                                    (
                                        [tid] =&gt; 95
                                        [vid] =&gt; 1
                                        [name] =&gt; zen
                                        [description] =&gt; 
                                        [format] =&gt; 
                                        [weight] =&gt; 0
                                        [vocabulary_machine_name] =&gt; tags


                       [rdf_mapping] =&gt; Array
The correct way would be 

print $node-&gt;field_episode_tags['und']['0']['taxonomy_term']-&gt;name


without the square brackets and quotes. Elements with in objects are accessed with 

-&gt;objectname 


and elements with in arrays are accessed by ['object']