retrieving data from a php object
<p>I am trying to access data inside a php object. I am confused about what the exact stynax is. Here is the output of the object:</p>

<pre><code>stdClass Object ( [vid] =&gt; 10 [uid] =&gt; 1 [title] =&gt; Beachhead Don [log] =&gt; 
[status] =&gt;  1 [comment] =&gt; 1 [promote] =&gt; 0 [sticky] =&gt; 0 [ds_switch] =&gt; [nid] =&gt; 
10 [type] =&gt; product [language] =&gt; und [created] =&gt; 1357668665 [changed] =&gt; 1358198386 
[tnid] =&gt; 0 [translate] =&gt; 0 [revision_timestamp] =&gt; 1358198386 [revision_uid] =&gt; 1  
[model] =&gt; B 3000 [list_price] =&gt; 0.00000 [cost] =&gt; 0.00000 [sell_price] =&gt; 1.00000 
[weight] =&gt; 0 [weight_units] =&gt; lb [length] =&gt; 0 [width] =&gt; 0 [height] =&gt; 0 
[length_units] =&gt; in [pkg_qty] =&gt; 1 [default_qty] =&gt; 1 [unique_hash] =&gt; 
2eec0fcc8483f3a3541870fb24223296 [ordering] =&gt; 0 [shippable] =&gt; 0 [price] =&gt; 1.00000 
[body] =&gt; Array ( [und] =&gt; Array ( [0] =&gt; Array ( [value] =&gt; Description info 
))))))))))))))))))))))))))))))))))))))0 [summary] =&gt; [format] =&gt; filtered_html 
[safe_value] =&gt;Description info ))))))))))))))))))))))))))))))))))))))0[safe_summary] 
=&gt; ) ) ) [uc_product_image] =&gt; Array ( [und] =&gt; Array ( [0] =&gt; Array ( [fid] =&gt; 11 
[alt] =&gt; [title] =&gt; [width] =&gt; 90 [height] =&gt; 120 [uid] =&gt; 1 [filename] =&gt; 
beachhead_don.jpg [uri] =&gt; public://beachhead_don.jpg [filemime] =&gt; image/jpeg 
[filesize] =&gt; 14342 [status] =&gt; 1 [timestamp] =&gt; 1357668665 [rdf_mapping] =&gt; Array ( ) 
) ) ) [field_author] =&gt; Array ( [und] =&gt; Array ( [0] =&gt; Array ( [value] =&gt; John B. 
Romesier [format] =&gt; [safe_value] =&gt; John B. Romesier ) ) ) [field_publisher] =&gt; Array 
( [und] =&gt; Array ( [0] =&gt; Array ( [value] =&gt; Unknown [format] =&gt; [safe_value] =&gt; 
Unknown ) ) ) [field_release_date] =&gt; Array ( [und] =&gt; Array ( [0] =&gt; Array ( [value] 
=&gt; Mar 2012 [format] =&gt; [safe_value] =&gt; Mar 2012 ) ) ) [field_number_of_pages] =&gt; Array 
( [und] =&gt; Array ( [0] =&gt; Array ( [value] =&gt; 123 ) ) ) [field_catagory] =&gt; Array ( 
[und] =&gt; Array ( [0] =&gt; Array ( [tid] =&gt; 4 ) ) ) [field_book_type] =&gt; Array ( [und] =&gt; Array ( [0] =&gt; Array ( [tid] =&gt; 1 ) ) ) [field_isbn] =&gt; Array ( ) [field_about_the_author] =&gt; Array ( [und] =&gt; Array ( [0] =&gt; Array ( [value] =&gt; Beachhed Don authoer............................ [format] =&gt; [safe_value] =&gt; Beachhed Don authoer............................ ) ) ) [rdf_mapping] =&gt; Array ( [rdftype] =&gt; Array ( [0] =&gt; sioc:Item [1] =&gt; foaf:Document ) [title] =&gt; Array ( [predicates] =&gt; Array ( [0] =&gt; dc:title ) ) [created] =&gt; Array ( [predicates] =&gt; Array ( [0] =&gt; dc:date [1] =&gt; dc:created ) [datatype] =&gt; xsd:dateTime [callback] =&gt; date_iso8601 ) [changed] =&gt; Array ( [predicates] =&gt; Array ( [0] =&gt; dc:modified ) [datatype] =&gt; xsd:dateTime [callback] =&gt; date_iso8601 ) [body] =&gt; Array ( [predicates] =&gt; Array ( [0] =&gt; content:encoded ) ) [uid] =&gt; Array ( [predicates] =&gt; Array ( [0] =&gt; sioc:has_creator ) [type] =&gt; rel ) [name] =&gt; Array ( [predicates] =&gt; Array ( [0] =&gt; foaf:name ) ) [comment_count] =&gt; Array ( [predicates] =&gt; Array ( [0] =&gt; sioc:num_replies ) [datatype] =&gt; xsd:integer ) [last_activity] =&gt; Array ( [predicates] =&gt; Array ( [0] =&gt; sioc:last_activity_date ) [datatype] =&gt; xsd:dateTime [callback] =&gt; date_iso8601 ) ) [cid] =&gt; 0 [last_comment_timestamp] =&gt; 1357668665 [last_comment_name] =&gt; [last_comment_uid] =&gt; 1 [comment_count] =&gt; 0 [name] =&gt; admin [picture] =&gt; 0 [data] =&gt; b:0; [entity_view_prepared] =&gt; 1 )
</code></pre>

<p>I am trying to retrive the [value] of Description info ))))))))))))))))))))))))))))))))))))))0</p>

<p>I tried this</p>

<pre><code>&lt;?php
$node = menu_get_object();  //drupal code
if ( !empty($node) ) {
print $node -&gt;body=&gt;und=&gt;0=&gt;value;

}?&gt;
</code></pre>

<p>and got an error about the '=' sign. What is the proper way to get my data?</p>
