HTML CSS JavaScript jQuery AJAX ASP PHP SQL tutorials, examples for web building ,author kapil kumar: November 2014
Pages
Home
About Kapil Kumar
Sunday, 30 November 2014
Age calculation in php
Age calculation in php
Declare a function =>
function getAge( $dob, $date )
{
$dob=strtotime($dob);
$date=strtotime($date);
$age = 0;
while( $date > $dob = strtotime('+1 year', $dob))
{
++$age;
}
return $age." years";
}
Read more »
Newer Posts
Older Posts
Home
Subscribe to:
Posts (Atom)