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

(12-12-2017, 10:03 PM)ivantcholakov Wrote:
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;
}

Sorry did not work repeated list multiple times.

I have found solution'sn from this answer

https://stackoverflow.com/questions/4778...name-shows
There's only one rule - please don't tell anyone to go and read the manual.  Sometimes the manual just SUCKS!
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 wolfgang1983 - 12-13-2017, 01:04 AM



Theme © iAndrew 2016 - Forum software by © MyBB