title: undefined index error when adding data to php array
body: <p>I have a php page that is using an associative array:</p>
  
  <pre><code>$piececount = array(array());
          $data = '';
                  while($calls = sqlsrv_fetch_array($objRs, SQLSRV_FETCH_ASSOC)) {
                      $data = '{#'.$calls["USR_ID"].'`'.date('mdY',strtotime($calls["DTE"])).'#}';
                      $piececount[$data]["count"] += $calls["SER_QTY"]; //This tallys up serial piece count per asset per day
  </code></pre>
  
  <p>This works, but for every iteration of the while loop PHP is logging the following errors:</p>
  
  <pre><code>PHP Notice:  Undefined index: {#41`01292019#} in C:\inetpub\wwwteam\Schedule\schedule.php on line 341
  PHP Notice:  Undefined index: count in C:\inetpub\wwwteam\Schedule\schedule.php on line 341
  </code></pre>
  
  <p>I know this is due to the index not being initialized but for the life of me i cannot figure out how to fix this.
  Anyone have any ideas what I am missing?</p>