Hay, i have a database holding events. There are 2 fields \'start\' and \'end\', these contain timestamps. When an admin enters these dates, they only have the ability to se
You just have to calculate the number of seconds between the two dates, then divide to get days :
$numDays = abs($smallestTimestamp - $biggestTimestamp)/60/60/24;
Then, you can use a for loop to retrieve the dates :
$numDays = abs($smallestTimestamp - $biggestTimestamp)/60/60/24;
for ($i = 1; $i < $numDays; $i++) {
echo date('Y m d', strtotime("+{$i} day", $smallestTimestamp)) . '
';
}
Again, if you don't know which timestamp is the smallest, you can use the min() function (second argument in strtotime).