Calendar Events not Loading
<p>I have a PHP/Mysql calendar that isn't loading the events from my database.  </p>

<p>I'm calling the events from my database here:</p>

<pre><code>/* date settings */
$month = (int) ($_GET['month'] ? $_GET['month'] : date('m'));
$year = (int)  ($_GET['year'] ? $_GET['year'] : date('Y'));

/* get all events for the given month */
$con = mysql_connect('***************', '******', '*******');
mysql_select_db(dbbmdmi);

$events = array();
$query = "SELECT CaptainLast, ArrDate FROM Teams";
$result = mysql_query($query) or die('cannot get results!');
while($rows = mysql_fetch_assoc($result)) {
    $events[$rows['ArrDate']] = $rows;
}
</code></pre>

<p>...which output correctly here:</p>

<pre><code>foreach ($events as $data) { 
        echo "Captain: $data[CaptainLast], Date: $data[ArrDate]&lt;br /&gt;\n"; 
}
</code></pre>

<p>...but don't populate my calendar days here:</p>

<pre><code>$event_day = $year.'-'.$month.'-'.$list_day;
            if(isset($events[$event_day])) {
                foreach($events[$event_day] as $event) {
                    $calendar.= '&lt;div class="event"&gt;'.$event[CaptainLast].'&lt;/div&gt;';
                }
            }
            else {
                $calendar.= str_repeat('&lt;p&gt;&amp;nbsp;&lt;/p&gt;',2);
            }
</code></pre>

<p>Any help would be greatly appreciated.</p>