<?php
	error_reporting(0);

	$user = "root";
	$password = "";
	$host = "localhost";
	$db = "test";

	$db_connection = mysql_connect($host, $user, $password);
	mysql_select_db($db, $db_connection); 
	
	if(!$db_connection)
	{
		die('Could not connect: ' . mysql_error());
	}

	$dates = array();
	$sql = 'SELECT * FROM reservation';
	$query = mysql_query($sql) or die (mysql_error());

	
	
	while ($data = mysql_fetch_assoc($query))
	{
		//$data['depart'] = date("Y-n-j", strtotime($data['depart']));
		
		$dates[] = $data['depart'];
   }

  // $dates[] = "28-10-2014";
   //$dates[] = "30-10-2014";
   echo json_encode($dates);        
?>