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
Are objects passed by value or by reference?
Which is better php or wordpress?
Is json a string php?
Which library is used in php to do various types of image work?
Difference between $message vs. $$Message in php.
What are the Advantages and Application Areas of PHP?
Can php run without apache?
What is the difference between include and require?
Is it possible to use com component in php?
How to create an array in php?
What is php good for?
What does explode do in php?
What is crypt () in php?
What is the difference between null and empty?
How do I make a reset button in html?