Welcome Guest, Not a member yet? Register   Sign In
Only display the month once
#2

Code:
$last_month = '*';

foreach ($results as $result) {

    $date = strtotime($result['event_date']);
    $month = date('M', $date);
    $day = date('d', $date);
    $day_of_week = date('D', $date);

    $section->addText(($month != $last_month ? $month : '')."\t". $day ."\t". $day_of_week ."\t". htmlentities($result['event_title']), null, $event_lists);

    $last_month = $month;
}
Reply


Messages In This Thread
Only display the month once - by wolfgang1983 - 12-12-2017, 07:47 PM
RE: Only display the month once - by ivantcholakov - 12-12-2017, 10:03 PM
RE: Only display the month once - by wolfgang1983 - 12-13-2017, 01:04 AM



Theme © iAndrew 2016 - Forum software by © MyBB