Jump to content

generating an event calendar


karatekid36

Recommended Posts

howdy everyone,

 

    So I am trying to generate an event calendar for my organization as our calendar.  I have built calendars in the past, but I am having a hard time taking those applications and marrying them into my new need.  My prior calendars where strictly dates.  I could construct this by hand, setting variables for each day and month, but with the power of PHP there has to be a better way.  Obviously I need to generate dynamically a calendar, but with in the day, be it in the <td> tags or however it is constructed, I would like it to fill it with events that I have in table.  The dates are stored as yyyy-mm-dd in the table so they should be easy enough, but I really just do not have a solid idea of how I can get it to echo the event's title and location in each day where the date on the cal matches the date on the event.  Also, shifting to prior and next months would be killer too.  If anyone has any ideas as to where I should start on this, please let me know.  Thanks and have a great day. 

Link to comment
https://forums.phpfreaks.com/topic/82393-generating-an-event-calendar/
Share on other sites

Here is a decent start to building the calendar

 

http://php.about.com/od/finishedphp1/ss/php_calendar.htm

 

Once you do that, what I did was build an array for the month with all the events, the first index being the day, and just looped through the events for the day and printed them in the TD field.  I can show you the result if you like.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.