Populating a calendar with PHP foreach code

前端 未结 1 1930
南笙
南笙 2021-01-27 20:59

I am using the following jQuery calendar: https://github.com/MrHus/jquery-monthly-ical/tree/

Following the documentation, it tells me that dates should be entered like

1条回答
  •  孤独总比滥情好
    2021-01-27 21:25

    This should do it:

    $dates = array();
    
    // build an array with that data
    foreach($events as $event)
      $dates[] = (object)array(
         'date'  => date('Y/m/d'),
         'title' => $event->title,
         'desc'  => sprintf('Details/Signups', SITE_URL, $event->id),
      );
    
    ?>
    
    eventdates:
    
    
    

    0 讨论(0)
提交回复
热议问题