title: PHP append data to array object
body: <p>In PHP I have an array <code>$test</code>. Running <code>var_dump($test)</code> looks like this:</p>
  
  <pre><code>array(2) {
    [0]=&gt;
    object(stdClass)#2 (6) {
      ["name"]=&gt;
      string(45) "Lorem"
      ["title"]=&gt;
      string(96) "Lorem ipsum"
    }
    [1]=&gt;
    object(stdClass)#3 (6) {
      ["name"]=&gt;
      string(41) "Ipsum"
      ["title"]=&gt;
      string(86) "Dolor sit amet"
    }
  }
  </code></pre>
  
  <p>Now I need to add another field (<code>url</code>) to the <code>$test</code> objects so it looks like:</p>
  
  <pre><code>array(2) {
    [0]=&gt;
    object(stdClass)#2 (6) {
      ["name"]=&gt;
      string(45) "Lorem"
      ["title"]=&gt;
      string(96) "Lorem ipsum"
      ["url"]=&gt;
      string(86) "http://www.google.com"
    }
    [1]=&gt;
    object(stdClass)#3 (6) {
      ["name"]=&gt;
      string(41) "Ipsum"
      ["title"]=&gt;
      string(86) "Dolor sit amet"
      ["url"]=&gt;
      string(86) "http://www.stackoverflow.com"
    }
  }
  </code></pre>
  
  <p>I've tried <code>foreach()</code> and <code>$test-&gt;append('xxxxxxxx');</code>, but am getting errors. Shouldn't this be real easy to do? What am I doing wrong?</p>