My favorites
▼
|
Sign in
fullcalendar
ISSUE TRACKER HAS MOVED. DO NOT USE THIS (more info)
Project Home
Issues
Export to GitHub
New issue
Search
Search within:
All issues
Open issues
New issues
Issues to verify
for
Advanced search
Search tips
Subscriptions
Issue
1183
attachment: json-events.txt
(546 bytes)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<?php
include ('scripts/php/connectdb.php');
$mysqli = new mysqli('localhost', '$username', '$password', '$db');
$result = $mysqli->query("SELECT * FROM agenda");
$nr = mysqli_num_rows($result);
$json=array();
while($row = $result->fetch_assoc())
{
$title=$row['evento'];
$data=$row['dataora'];
$id=$row['ID'];
$dataarr=explode('/',$data);
$giorno=$dataarr[0];
$mese=$dataarr[1];
$anno=$dataarr[2];
$data="$anno - $mese - $giorno";
$json[]=array('id' => $id, 'title'=> $title,'start'=> $data );
}
echo json_encode($json);
?>
Powered by
Google Project Hosting