Jeg vil gerne have alderen udfra en dato men den regner 2 dage forkert...
function round_down($value){
list($val,$dummy) = explode(".",$value);
return $val;
}
//
$day = 10;
$month = 7;
$year = 1958;
//
$age = time() - mktime(0, 0, 0, $month, $day, $year);
$age = $age / (60) / (60) / (24) / (365);
//echo "you are ".round_down($age)." years old.";
echo "you are $age years old.";