title: Trying to create array but creates an object
body: <p>I'm currently trying to create an array in php that would have the current format:
  calendar[month][row][column], where month = 1 to 6</p>
  
  <p>This is basically the code I used to create it. There's more to it, but I'm hoping this suffices.</p>
  
  <pre><code>function db_to_matrix($date_start, $date_end, $compliment, $workers, $worker_shifts, $shift_types)
  {
      $calendar = array();
      //Sets the titles up for each months array
      $date = clone $date_start;
      while ($date &lt;= $date_end)
      {
          $calendar[date_format($date,'n')] = array();
          $calendar[date_format($date,'n')][0][] = "db_table";
          $calendar[date_format($date,'n')][0][] = "id";
          $calendar[date_format($date,'n')][0][] = "";
          $calendar[date_format($date,'n')][1][] = "";
          $calendar[date_format($date,'n')][1][] = "";
          $calendar[date_format($date,'n')][1][] = "";
          $calendar[date_format($date,'n')][2][] = "compliment";
          $calendar[date_format($date,'n')][2][] = "compliment_day";
          $calendar[date_format($date,'n')][2][] = "Day Comp";
          $calendar[date_format($date,'n')][3][] = "compliment";
          $calendar[date_format($date,'n')][3][] = "compliment_day_actual";
          $calendar[date_format($date,'n')][3][] = "Act Day";
          $calendar[date_format($date,'n')][4][] = "compliment";
          $calendar[date_format($date,'n')][4][] = "compliment_night";
          $calendar[date_format($date,'n')][4][] = "Night Comp";
          $calendar[date_format($date,'n')][5][] = "compliment";
          $calendar[date_format($date,'n')][5][] = "compliment_night_actual";
          $calendar[date_format($date,'n')][5][] = "Act Night";
          date_modify($date,"+1 month");
      }
  }
  </code></pre>
  
  <p>What I end up with is the following: </p>
  
  <p>Object {1: Array[95], 2: Object, 3: Object, 4: Object, 5: Object, 6: Object}</p>
  
  <p>I'm ok with $calendar being an object, but every "variable" after that I would like to get Array. Example: Object {1: Array[95], 2: Array[95], 3: Array[95], 4: Array[95], 5: Array[95], 6: Array[95]}</p>