title: How to make PHP stdClass Object that has the same name?
body: <p>I'm working against an API that gives me an stdClass object that looks like this (actual data replaced)</p>
  
  <pre><code>"data": [
      {
        "type": "image",
        "comments": {
          "data": [
            {
              "created_time": "1346054211",
              "text": "Omg haha that's a lot of squats",
              "from": {},
              "id": "267044541287419185"
            },
            {
              "created_time": "1346054328",
              "text": "Fit body",
              "from": {},
              "id": "267045517536841021"
            },
          ]
        },
        "created_time": "1346049912",
      },
  </code></pre>
  
  <p>How is it possible to create an stdClass object like "Comments" that have multiple sub fields all with same name but different data. When I try to create an stdClass looking like this my Comments section will only contain 1 input which is the final one in the while loop. 
  So instead of applying to the bottom it's replacing the old data with the new one. 
  How to fix this?</p>