Below is the complet function and the string of code that I’m trying to use to calculate a persons age.
It not wanting on my web server, for some reason when it gets to the point to exicute the string to calcualte the age the code stops runing. everythingis displayed until this point but nothing after. there are no error message shown either.
Any idea why this is happening.
Thank you
[code=php]
<?
function dateDiff($dformat, $endDate, $beginDate)
{
$date_parts1=explode($dformat, $beginDate);
$date_parts2=explode($dformat, $endDate);
$start_date=gregoriantojd($date_parts1[1], $date_parts1[2], $date_parts1[0]);
$end_date=gregoriantojd($date_parts2[1], $date_parts2[2], $date_parts2[0]);
return $end_date – $start_date;
}
?>
[code=php]
$ownerAge = floor(dateDiff(“-“, date(“Y-m-d”), $dob)/365);