PEAR Calendar with multiple entries

Hi,

I am a newbie programmer…

I took the phplive online course and decided to build a little web app and this app uses the PEAR calendar. I have used the samples that Harry F provided and have it working the way I like it, with one exception. I cannot get multiple entries to display for the same day. (I changed the sample to days from hours and show the monthly calendar.)

my calendar entries are in the form of an array (timestamp, event name)

I loop through my database results:

 while ( $row = mysqli_fetch_array($result))
    {
        $events[] = array('timestamp' =>  $row['rfc_req_dttm'],  'entry' => '<a href="../review/?rfc_record='.$row['rfc_id'].'">PCR'.$row['rfc_id'].'</a>');
        
    }

I got his out of the example at:

http://pearcalendar.sourceforge.net/examples/11.phps

foreach ( $events as $row ) {
    $day = new Calendar_Day(2000,1,1,1); // Create Hour with dummy values
    
$day->setTimeStamp($row['timestamp']); 

    // Create the decorator, passing it the Day
    $DiaryEvent = new DiaryEvent($day);

    // Attach the payload
    $DiaryEvent->setEntry($row['entry']);

    // Add the decorator to the selection
    $selection[] = $DiaryEvent;
}


There are multiple entries for a specific day, but only one shows up in my calendar.

I tried to figure out the sample at:
http://smarty.incutio.com/?page=PEARCalendarExploration

But that was a bit out of my experience level.

Can anyone give me direction? I would be grateful.