border:1px solid blue;
width: 200px;


function draw_calendar($month,$year,$events = array()){

/* draw table */
$calendar = '<table cellpadding="0" cellspacing="0" class="calendar">';

/* table headings */
$headings = array('Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday');
$calendar.= '<tr class="calendar-row"><td class="calendar-day-head" align="center">'.implode('</td><td class="calendar-day-head" align="center">',$headings).'</td></tr>';

/* days and weeks vars now ... */
$running_day = date('w',mktime(0,0,0,$month,1,$year));
$days_in_month = date('t',mktime(0,0,0,$month,1,$year));
$days_in_this_week = 1;
$day_counter = 0;
$dates_array = array();

/* row for week one */
$calendar.= '<tr class="calendar-row">';

/* print "blank" days until the first of the current week */
for($x = 0; $x < $running_day; $x++):
$calendar.= '<td class="calendar-day-np"> </td>';

/* keep going with days.... */
for($list_day = 1; $list_day <= $days_in_month; $list_day++):
$calendar.= '<td class="calendar-day"><div style="position:relative;height:100px;">';
/* add in the day number */
$calendar.= '<div class="day-number">'.$list_day.'</div>';
if ($list_day<10){ $list_day = "0".$list_day; }
$event_day = $year.'-'.$month.'-'.$list_day;
if(isset($events[$event_day])) {
foreach($events[$event_day] as $event) {

$calendar.= '<div class="details"><img class="'.$event['post_id'].'" src="images/icons/football.png"><div class="'.$event['post_id'].'">'.$event['school_name'].$event['post_id'].'</div></div>';


This is the part of my code that I need help with. As you can see my calender loops through the dates and displays any events. Well when someone mouses over the img I want more details to pop up. It worked until I realized that everytime you moseover the img all the details for every event pops up. Each event has an event id. I figured I could use that so each event is unique. My code is at a dead end. Can anyone do what I want in my way or a new way? Thanks.