I have this code
<?php
function getDatesBetween2Dates($startTime, $endTime) {
$day = 86400;
$format = 'd-m-Y';
$startTime = strtotime($startTime);
$endTime = strtotime($endTime);
$numDays = round(($endTime - $startTime) / $day) + 1;
$days = array();
for ($i = 0; $i < $numDays; $i++) {
$days[] = date($format, ($startTime + ($i * $day)));
}
return $days;
}
$days = getDatesBetween2Dates(
date('d-m-Y', strtotime("$start")),
date('d-m-Y',strtotime("$end"))
);
foreach ($days as $key => $value) {
// ...
}
this then goes on to search a database and display results based on a date return. I did not write this code and have no idea where i had it from.
The problem is that is is returning two 2nd november 2014??? Its messing every thing up. Any help would be awesome. I shall try and share a page link. ( the page holds personal info)
http://djwservices.co.uk/invoices/calendar.php
As a side question if anyone can get the expand/shrink to work on onclick that would be awesome.
Thanks in advance Daz