Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

Calculate Age or Date of Birth in PHP

$dateOfBirth = "15-06-1995";
$today = date("Y-m-d");
$diff = date_diff(date_create($dateOfBirth), date_create($today));
echo 'Your age is '. $diff->format('%y');
 
PREVIOUS NEXT
Tagged: #Calculate #Age #Date #Birth #PHP
ADD COMMENT
Topic
Name
3+3 =