title: Echo Array data with foreach
body: <p>I have a MySQL Query with following code:</p>
  
  <pre><code>$stmt_offer = $pdo-&gt;query("SELECT * FROM `offers` WHERE `fs` = '1' ORDER BY `id` DESC LIMIT 15");
  
  
    foreach ($stmt_offer as $row):
      $array_s['hbid']        = $row['ang_id'];
      $array_s['title']       = $row['titel'];
      $array_s['size']        = $row['qm'];
      $array_s['description'] = $row['beschreibung'];
    endforeach;
  
    $array_object['response'] = $array_s;
    $array_offer['offer']     = $array_object;
  
    echo json_encode($array_offer);
  </code></pre>
  
  <p>The Code works finde, but i get only one result back.</p>
  
  <p>My Output:</p>
  
  <pre><code>{
   "offer":
    {
     "response":
      {
       "hbid":"1234567",
       "title":"Test",
       "size":"100",
       "description":"my_description"
    }
   }
  }
  </code></pre>
  
  <p>What's the error in the foreach code? </p>