title: get a specific element from an array
body: <p>I have an array as follows and i want to get any specific element from this array: array is stored in a variable as.</p>
  
  <pre><code>   $results = 
  
          Array
             (
          [0] =&gt; stdClass Object
                           (
          [id] =&gt; 1
          [calendar] =&gt; 1
          [time] =&gt; 2016-01-22 17:25:28
          [booked_time] =&gt; 01/22/2016 11:00
          [booked_time_unformatted] =&gt; 2016-01-22 11:00:00
          [name] =&gt; Shoaib
          [email] =&gt; shoaib@techleadz.com
          [phone] =&gt; 0987654321
          [question] =&gt; 123
          [quantity] =&gt; 1
          [buffered_date] =&gt; a:9:{s:5:"PRICE";s:2:"25";s:10:"COUPONCODE";s:0:"";s:8:"QUANTITY";N;s:4:"NAME";s:6:"Shoaib";s:5:"EMAIL";s:20:"shoaib@techleadz.com";s:5:"PHONE";s:10:"0987654321";s:8:"COMMENTS";s:3:"123";s:4:"DATE";s:10:"01/22/2016";s:4:"TIME";s:5:"11:00";}
          [submitted] =&gt; 1
      )
  
  [1] =&gt; stdClass Object
      (
          [id] =&gt; 2
          [calendar] =&gt; 1
          [time] =&gt; 2016-01-23 10:39:30
          [booked_time] =&gt; 01/25/2016 15:00
          [booked_time_unformatted] =&gt; 2016-01-25 15:00:00
          [name] =&gt; Shoaib
          [email] =&gt; shoaib@techleadz.com
          [phone] =&gt; 0987654321
          [question] =&gt; dsadasd
          [quantity] =&gt; 1
          [buffered_date] =&gt; a:9:{s:5:"PRICE";s:2:"25";s:10:"COUPONCODE";s:0:"";s:8:"QUANTITY";N;s:4:"NAME";s:6:"Shoaib";s:5:"EMAIL";s:20:"shoaib@techleadz.com";s:5:"PHONE";s:10:"0987654321";s:8:"COMMENTS";s:7:"dsadasd";s:4:"DATE";s:10:"01/25/2016";s:4:"TIME";s:5:"15:00";}
          [submitted] =&gt; 1
      )
  
  [2] =&gt; stdClass Object
      (
          [id] =&gt; 3
          [calendar] =&gt; 1
          [time] =&gt; 2016-01-23 11:27:22
          [booked_time] =&gt; 01/25/2016 11:00
          [booked_time_unformatted] =&gt; 2016-01-25 11:00:00
          [name] =&gt; test
          [email] =&gt; shoaib@techleadz.com
          [phone] =&gt; 0987654321
          [question] =&gt; asfas
          [quantity] =&gt; 1
          [buffered_date] =&gt; a:9:{s:5:"PRICE";s:2:"25";s:10:"COUPONCODE";s:0:"";s:8:"QUANTITY";N;s:4:"NAME";s:4:"test";s:5:"EMAIL";s:20:"shoaib@techleadz.com";s:5:"PHONE";s:10:"0987654321";s:8:"COMMENTS";s:5:"asfas";s:4:"DATE";s:10:"01/25/2016";s:4:"TIME";s:5:"11:00";}
          [submitted] =&gt; 0
      )
  
              )
  </code></pre>
  
  <p>Now i have an array like this so how i can get the the value for [submitted] foreach element in this array.</p>