Posted By

Kerrick on 03/31/11


Tagged


Versions (?)

Calendar Items


 / Published in: PHP
 

  1. <?php
  2. $calendaritems = array(
  3. "link" => "http://calendar.semo.edu/main.php?calendarid=default&view=event&eventid=1286983401313&timebegin=2011-01-27+00:00:00",
  4. "title" => "Redhawks Women's Basketball",
  5. "iso_date" => "2011-01-27T17:15:00-06:00"
  6. ),
  7. "link" => "http://calendar.semo.edu/main.php?calendarid=default&view=event&eventid=1286915797011&timebegin=2011-01-27+00%3A00%3A00",
  8. "title" => "Redhawks Men's Basketball",
  9. "iso_date" => "2011-01-27T19:30:00-06:00"
  10. ),
  11. "link" => "http://calendar.semo.edu/main.php?calendarid=default&view=event&eventid=1291666633971&timebegin=2011-01-28+00%3A00%3A00",
  12. "title" => "Redhawks Indoor Track and Field",
  13. "iso_date" => "2011-01-28"
  14. ),
  15. "link" => "http://calendar.semo.edu/main.php?calendarid=default&view=event&eventid=1282765834009-0020&timebegin=2011-01-28+00%3A00%3A00",
  16. "title" => "The Art of the Brick",
  17. "iso_date" => "2011-01-28T10:00:00-06:00"
  18. ),
  19. "link" => "http://calendar.semo.edu/main.php?calendarid=default&view=event&eventid=1282837966938-0020&timebegin=2011-01-28+00%3A00%3A00",
  20. "title" => "Transition Spaces Series - Peter Chanthanakone: Transition Spaces 10.3",
  21. "iso_date" => "2011-01-28T10:00:00-06:00"
  22. ),
  23. );
  24. ?>
  25. <ol>
  26. <?php
  27. foreach ($calendaritems as $item) {
  28. echo '<li><a href="'.$item["link"].'"><time datetime="'.$item["iso_date"].'">'.strftime("%b %d, %I:%M %p",strtotime($item["iso_date"])).'</time>'.$item["title"].'</a></li>';
  29. }
  30. ?>
  31. </ol>

Report this snippet  

You need to login to post a comment.