title: Access Parts of Object in PHP
body: <p>I have an object called $definition in PHP.</p>
  
  <p>When I</p>
  
  <pre><code>print_r($definition);
  </code></pre>
  
  <p>I get</p>
  
  <blockquote>
    <p>Array ( [0] => Definition Object ( [extendedText] => [text] => Any of several carnivorous burrowing mammals of the family Mustelidae, such as Meles meles of Eurasia or Taxidea taxus of North America, having short legs, long claws on the front feet, and a heavy grizzled coat. [source] => [sourceDictionary] => ahd-legacy [citations] => Array ( ) [labels] => Array ( ) [score] => 0 [exampleUses] => Array ( ) [attributionUrl] => [seqString] => [attributionText] => from The American HeritageÂ® Dictionary of the English Language, 4th Edition [relatedWords] => Array ( ) [sequence] => 0 [word] => badger [textProns] => Array ( ) [notes] => Array ( ) [partOfSpeech] => noun ) )</p>
  </blockquote>
  
  <p>How do I print out the "text" and "partOfSpeech" components?</p>
  
  <p>I've tried $definition->text, $definition[0]['text'], $definition['text']....</p>
  
  <p>I'm lost... </p>