- time: documentation ( source)
- strtotime: documentation ( source)
<?php
function daycount($day, $startdate, $counter)
{
if($startdate >= time())
{
return $counter;
}
else
{
return daycount($day, strtotime("next ".$day, $startdate), ++$counter);
}
}
echo daycount("monday", strtotime("18.01.2016"), 0);