title: PHP Array stdClass Object - Echo Value
body: <p>so I have this array saved in a variable title <code>$arr</code>.  I want to grab or echo the value of [slug]</p>
  
  <pre><code>Array ( [0] =&gt; stdClass Object ( [term_id] =&gt; 11 
                                   [name] =&gt; Community Service 
                                   [slug] =&gt; community-service 
                                   [term_group] =&gt; 0 
                                   [term_taxonomy_id] =&gt; 11 
                                   [taxonomy] =&gt; category
  </code></pre>
  
  <p>So i want something like this </p>
  
  <blockquote>
    <p>echo $arr[slug]</p>
  </blockquote>
  
  <p>which would then display "community-service".  I am sure this is something pretty easy but i can't figure out how to grab the value out of an array stdClass and echo it on the page. Thank you.</p>