Only display the month once - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5) +--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24) +--- Thread: Only display the month once (/showthread.php?tid=69548) |
Only display the month once - wolfgang1983 - 12-12-2017 Hi, In my list below as you can see it has printed the word "Nov" & "Jan" multiple times I use codeigniter with phpword to get the database results I would like the word of the month to only show once on the first one if has more than one like in this image Here is my controller code PHP Code: public function export() { RE: Only display the month once - ivantcholakov - 12-12-2017 Code: $last_month = '*'; RE: Only display the month once - wolfgang1983 - 12-13-2017 (12-12-2017, 10:03 PM)ivantcholakov Wrote: Sorry did not work repeated list multiple times. I have found solution'sn from this answer https://stackoverflow.com/questions/47785003/limit-the-number-of-times-month-name-shows RE: Only display the month once - ivantcholakov - 12-13-2017 This very basic piece of code can not cause the effect you described. You should have used it as a replacement of your cycle. |