![]() |
Setting event using a date, not a day in every month? - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Setting event using a date, not a day in every month? (/showthread.php?tid=3990) |
Setting event using a date, not a day in every month? - El Forum - 11-01-2007 [eluser]stef569[/eluser] Hi, When I add a event to my calendar I want to set it to a specific date. atm I use Code: <?php $events = array( But it appears to only work with days, I tried to put a date in but AAA is not showing up. Does the calender only support reoccuring events over months? nvm reading uri.. can't delete this topic. Setting event using a date, not a day in every month? - El Forum - 11-01-2007 [eluser]gtech[/eluser] It took me a while to understand what you mean but I think you want something like the following? Code: <?php Setting event using a date, not a day in every month? - El Forum - 11-02-2007 [eluser]stef569[/eluser] Well, yes but I use a db so my code looks as following: Code: function show() { but I get Quote:A PHP Error was encountered ![]() Setting event using a date, not a day in every month? - El Forum - 11-02-2007 [eluser]gtech[/eluser] Code: // Create array of days with content I'll put my pennies worth in.. think as you are using arrays to access the query result you should be using $query->result_array(); you need to default the events array in case nothing is returned and also you were also overwriting the events array (not sure that was desired behavior?) I have tried to do a fix see above but it is untested. another tip, if your debugging use echo and print_r to display variables (you can take them out when it works) e.g. Code: ... Setting event using a date, not a day in every month? - El Forum - 11-02-2007 [eluser]stef569[/eluser] Hi, I saw my errors and correct them, 1. I was overwriting my array (no that wasen't part of the plan :d) 2. I thought I got an aray when it was an object. 3. Input validation 4. Testing i didn't know about the print_r will look into it. This works: Code: // Create array of days as key with content(userId) Thx for the help once again, I realy learnt alot from your code examples Mayby once I can help you out ![]() ![]() |