How to create the PHP Script to Calculate the Age Using the
Inputs Of our Birth date and the Current date?
Answer Posted / sandhya
<?php
$date1 = time();
$date2 = mktime(0,0,0,02,01,1979);
$ddif = $date1 - $date2;
$age = floor(($ddif/(60*60*24))/365);
echo $age;
?>
| Is This Answer Correct ? | 0 Yes | 6 No |
Post New Answer View All Answers
What is php in full?
What does a special set of tags do in php?
What is foreach loop in php?
What kind of variable is age?
How to track user logged out or not? When user is idle?
What is PHP's configuration file called?
What is ci in php?
How to execute a php script from the command line?
What is the goto statement useful for?
How to compare two strings with comparison operators in php?
Is php front end or back end?
Can we run php on tomcat server?
Tell me when a conditional statement is ended with an endif?
What is difference between md5 and SHA256?
What is meant by urlencode and urldecode?