title: php access property of object in array
body: <p>I have a php variable that I got from a _POST.  var_dump shows this:</p>
  
  <pre><code>array(9) { [0]=&gt; array(2) { ["age"]=&gt; string(2) "62"
  ["amount"]=&gt; string(5) "10878" } [1]=&gt; array(2) { ["age"]=&gt; string(2) "63"
  ["amount"]=&gt; string(5) "10878" } [2]=&gt; array(2) { ["age"]=&gt; string(2) "64"
  ["amount"]=&gt; string(5) "10878" } [3]=&gt; array(2) { ["age"]=&gt; string(2) "65"
  ["amount"]=&gt; string(5) "10878" } [4]=&gt; array(2) { ["age"]=&gt; string(2) "66"
  ["amount"]=&gt; string(5) "10878" } [5]=&gt; array(2) { ["age"]=&gt; string(2) "67"
  ["amount"]=&gt; string(5) "28416" } [6]=&gt; array(2) { ["age"]=&gt; string(2) "68" 
  ["amount"]=&gt; string(5) "28416" } [7]=&gt; array(2) { ["age"]=&gt; string(2) "69" 
  ["amount"]=&gt; string(5) "28416" } [8]=&gt; array(2) { ["age"]=&gt; string(2) "70" 
  ["amount"]=&gt; string(5) "28416" } }
  </code></pre>
  
  <p>I loop through the array but can't get the properties to print:</p>
  
  <pre><code>for ($i=0; $i&lt;count($incomeSched); $i++) {
      $age = $incomeSched[$i]-&gt;age;
      $amt = $incomeSched[$i]-&gt;amount;
      echo "age=$age, amount=$amt&lt;br&gt;";
  }
  </code></pre>
  
  <p>age and amount are blank:</p>
  
  <pre><code>age=, amount=
  </code></pre>