Adding days to a specific date inside an array
<p>I have a TABLE <code>events</code> </p>

<pre><code>`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`data` date DEFAULT NULL,
`days` int(2) DEFAULT NULL,
PRIMARY KEY (`id`)
</code></pre>

<p>with a number of records.</p>

<p>I generate an array with all unavailable dates</p>

<pre><code>$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"];
}
</code></pre>

<p>The array $unavailable is like this: (2012-08-10, 2012-08-25)
The array $days is like this: (3, 2)</p>

<p>I need an array like this: (2012-08-10, 2012-08-11, 2012-08-12, 2012-08-25, 2012-08-26)</p>

<p>Thank you!</p>
