for ($i=1-$firstday;$i<=count($results);$i+=7)
{
echo $day_cell_header_row;
if($CONFIG['cal_view_show_week']) {
$weeknumber_cell_row1 = str_replace('{WEEK_NUMBER}', $results[$i<1?1:$i]['week_number'], $weeknumber_cell_row);
$week_stamp = mktime(0,0,0,$date['month'],$i + 6,$date['year']);
$url_week_date = date("Y-m-d", $week_stamp);
echo str_replace('{URL_WEEK_VIEW}', $ME."?mode=week&date=".$url_week_date, $weeknumber_cell_row1);
}
for ($row=0;$row<7;$row++)
{
$day_stamp = mktime(0,0,0,$date['month'],$i + $row,$date['year']);
$url_target_date = date("Y-m-d", $day_stamp);
if($i+$row<1 || $i+$row> $nr) {
$date_string = ucwords(strftime($lang_date_format['month_year'], $day_stamp));
echo str_replace('{CELL_CONTENT}', $date_string,$other_month_cell_row);
} else {
$date_string = ucwords(strftime($lang_date_format['day_month_year'], $day_stamp));
for ($i=1-$firstday;$i<=count($results);$i+=7)
That may be the relevant code you are talking about, I am not sure.
This may be stupid, but you could try changing 7 to 5. I really doubt that will work but who knows.
An IF statement might work as well, or a SELECT CASE. But at this point, I just don't know. Someone more advance here might be able to help you.