Skip to main content

calendar

Simple PHP Calendar

Posted in

Posted it on my blog, but I decided that I should share it here as well, for those of you that need a simple php calendar.

  1. <?php
  2. // This gets today's date
  3. $date = time ();
  4.  
  5. // This puts the day, month, and year in seperate variables
  6. $day  = date('d', $date);
  7. $month= date('m', $date);
  8. $year = date('Y', $date);
  9.  
  10. // Here we generate the first day of the month
  11. $first_day = mktime(0,0,0,$month, 1, $year);
  12.  
  13. //This gets us the month name
  14. $title = date('F', $first_day);

If you need more help on the topic feel free to add a comment or create a new post on the Forum

Syndicate content