I have a TABLE events
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`data` date DEFAULT NULL,
`days` int(2) DEFAULT NULL,
PRIMARY KEY (`id`)
with a number of records.
I generate an array with all unavailable dates
$sql = "SELECT * FROM events WHERE `data` LIKE '".$cYear."-".$cMonth."-%'";
$sql_result = mysql_query ($sql, $connection ) or die ('request "Could not execute SQL query" '.$sql);
while ($row = mysql_fetch_assoc($sql_result)) {
$unavailable[] = $row["data"];
$days[] = $row["days"];
}
The array $unavailable is like this: (2012-08-10, 2012-08-25) The array $days is like this: (3, 2)
I need an array like this: (2012-08-10, 2012-08-11, 2012-08-12, 2012-08-25, 2012-08-26)
Thank you!