Why between those dates i get 5,9.... and if i use another year i get 6 ???? It only happens with march and 2008... why is there an hour difference ???
<?php
$from = '2008-03-04';
$to = '2008-03-10';
echo datediff($from,$to);
$from = '2010-03-04';
$to = '2010-03-10';
echo datediff($from,$to);
function datediff($from,$to)
{
$diff = strtotime($to) - strtotime($from);
$diff = $diff/(60*60*24);
return $diff;
}
?>