title: Adding rows to an array in PHP
body: <p>I have loaded an associative array of records from a MySQL database table.</p>
  
  <p>The array consists of 1 to 7 rows representing one week of entries,
  which might not have been entered for each day.</p>
  
  <p>How can I insert blank rows into the array for the missing days
  so that I can easily display the data in a table?</p>
  
  <p>I don't need to update the database with the blanks.</p>
  
  <p><strong>Example:</strong></p>
  
  <pre><code>             Field1  Field2  Field3  Field4 .... Field#  
  Record[0]
  Record[1]
  Record[2]
  Record[3]
  Record[4]
  Record[5]
  Record[6]
  </code></pre>
  
  <p>Field4 is the date as yyyy-mm-dd</p>
  
  <p>I load the array automatically using a start date and end date</p>
  
  <p>Some weeks there will be a Sun, Tue, and Fri or Mon, Tue, Wed, Fri &amp; Sat.</p>