I'm creating a calendar application in PHP with CodeIgniter. In the main calendar page, My model currently creates an array with each index being one day on the current month. That day is an array containing any events the user may have on that day. Now, should I construct the calendar array in the controller FIRST, then pass it to the model so the model can access the database and fill in all the events, or should I just create the calendar array and fill in the events ALL in the model?
$month = array( 'blank', 'blank', 'day1' => array( event 1, event2), 'day2' => ... );