title: Inconsistent behavior when creating arrays from two similar MySQL result sets
body: <p>I am attempting to create multidimensional arrays from  data in my database whereby each row would be an array. I have attempted this on two different columns with varying results which I'm not sure why. </p>
  
  <p><strong>First Column Loop :</strong></p>
  
  <pre><code>$db_time_qry = "Select Time from Schedule";
      $db_time_res = mysqli_query($link, $db_time_qry);
      while ($row_c = mysqli_fetch_assoc($db_time_res)) {
          $db_times [] = $row_c['Time'];
      }
      print_r($db_times);
  </code></pre>
  
  <p>Which returns the following :</p>
  
  <pre><code>Array
  (
      [0] =&gt; 06:00:00
      [1] =&gt; 06:00:00
      [2] =&gt; 06:00:00
      [3] =&gt; 06:00:00
      [4] =&gt; 06:00:00
      [5] =&gt; 06:30:00
      [6] =&gt; 06:00:00
  )
  </code></pre>
  
  <p><strong>Second Column Loop :</strong></p>
  
  <pre><code>  $qryDay = ("Select Day from Schedule");
      $day_res_ = mysqli_query($link, $qryDay);
      while ($row_day_ = mysqli_fetch_assoc($day_res_)) {
          if (strlen($row_day_['Day'] == 3)) {
              $day_array_ [] = $row_day_['Day'];
          } else {
              $day_array_ [] = explode(',', $row_day_['Day']);
          }
      }
      print_r($day_array_);
  </code></pre>
  
  <p>Which results into this :</p>
  
  <pre><code>Array
  (
      [0] =&gt; Array
          (
              [0] =&gt; Wed
          )
  
      [1] =&gt; Array
          (
              [0] =&gt; Tue
          )
  
      [2] =&gt; Array
          (
              [0] =&gt; Tue
          )
  
      [3] =&gt; Array
          (
              [0] =&gt; Thu
          )
  
      [4] =&gt; Array
          (
              [0] =&gt; Mon
          )
  
      [5] =&gt; Array
          (
              [0] =&gt; Sun
              [1] =&gt; Mon
              [2] =&gt; Tue
          )
  
      [6] =&gt; Array
          (
              [0] =&gt; Fri
          )
  
  )
  </code></pre>
  
  <p>The second loop returns what I want but why are they returning different results whilst using the same loop? Both arrays have been declared outside of the loops like so : <code>$db_times = $day_array_ = [];</code></p>