title: Get information from an array without loops
body: <p>I want to get term_id values from this array without any loops or foreach.
  I need it To be:</p>
  
  <p>First Term id is : 
  Second Term id is : </p>
  
  <p>I tried using echo $term[0]->term_id; but it is not working</p>
  
  <p>Here is My var_dump result:</p>
  
  <pre><code>array(2) {
    [0]=&gt;
    object(WP_Term)#4046 (10) {
      ["term_id"]=&gt;
      int(72)
      ["name"]=&gt;
      string(14) "samsung"
      ["slug"]=&gt;
      string(91) "samsung"
      ["term_group"]=&gt;
      int(0)
      ["term_taxonomy_id"]=&gt;
      int(72)
      ["taxonomy"]=&gt;
      string(11) "product_cat"
      ["description"]=&gt;
      string(0) ""
      ["parent"]=&gt;
      int(63)
      ["count"]=&gt;
      int(5)
      ["filter"]=&gt;
      string(3) "raw"
    }
    [1]=&gt;
    object(WP_Term)#4045 (10) {
      ["term_id"]=&gt;
      int(64)
      ["name"]=&gt;
      string(15) "onclikck"
      ["slug"]=&gt;
      string(8) "onclikck"
      ["term_group"]=&gt;
      int(0)
      ["term_taxonomy_id"]=&gt;
      int(64)
      ["taxonomy"]=&gt;
      string(11) "product_cat"
      ["description"]=&gt;
      string(92) "Description"
      ["parent"]=&gt;
      int(63)
      ["count"]=&gt;
      int(3)
      ["filter"]=&gt;
      string(3) "raw"
    }
  }
  </code></pre>