I would like to integrate the jQuery fullcalendar into my PHP website, but I don\'t know how to handle the event and how to use the JSON data from MySQL.
Any advice wou
This example works:
$sql= "SELECT id, title, start, DATE_FORMAT(start, '%Y-%m-%dT%H:%i' ) AS startDate
FROM kalender
ORDER BY startDate DESC";
$res = mysql_db_query($db, $sql, $conn) or die(mysql_error());
$events = array();
//important ! $start = "2010-05-10T08:30"; iso8601 format !!
while ($row = mysql_fetch_assoc($res)) {
$eventArray['id'] = $row['id'];
$eventArray['title'] = $row['title'];
$eventArray['start'] = $row['startDate'];
$events[] = $eventArray;
}
echo json_encode($events);