I made a print_r of the $node object to view its properties. This is the output.

stdClass Object
(
    [nid] => 3
    [vid] => 3
    [type] => shoes
    [status] => 1
    [created] => 1158082601
    [changed] => 1158082601
    [comment] => 2
    [promote] => 1
    [moderate] => 0
    [sticky] => 0
    [revision_timestamp] => 1158082601
    [title] => Cake
    [body] => dsaflfjsdalkfjskdalf
    [teaser] => asdklfjdaskfkldsf
    [log] => 
    [format] => 1
    [uid] => 1
    [name] => admin
    [picture] => 
    [data] => a:2:{s:6:"submit";s:18:"Create new account";s:7:"form_id";s:13:"user_register";}
    [last_comment_timestamp] => 1158082601
    [last_comment_name] => 
    [comment_count] => 0
    [copyright] => dgkadfjklasfjdklafdskl
    [taxonomy] => Array
        (
            [6] => stdClass Object
                (
                    [tid] => 6
                    [vid] => 1
                    [name] => bar
                    [description] => 
                    [weight] => 0
                    [language] => 
                    [trid] => 0
                )

        )

)

I want to retrieve the value "bar" but I can't figure out how to do that,my serveral attempts fails . More insight on how to do that will be much appreciated. Thanks

I tought this will work $node->taxonomy[6]->name, but never worked. even this $node->taxonomy[6]->$term->name