How to create the PHP Script to Calculate the Age Using the
Inputs Of our Birth date and the Current date?
Answer Posted / nirav desai
<?php
$a = date('Y',strtotime('1985-10-15'));
$b = date('Y');
$c = $b-$a;
echo "Current age is:: ".$c." Years .";
?>
| Is This Answer Correct ? | 5 Yes | 3 No |
Post New Answer View All Answers
Can we embedded directly PHP code into XHTML document? State Whether True or False?
Is polymorphism inherited?
How can cross site request forgery csrf be prevented?
What is session expiry?
Why do we use htaccess and where?
How do I expire a php session after 30 minutes?
Name some of the constants in php and their purpose.
When is a conditional statement ended with endif?
What is difference between post and put in rest?
How do you pass a variable by value in php?
Php code to find whether a number armstrong or not?
What is session php?
How to get number of days between two given dates using PHP?
What the use of var_dump()?
What is a helper function?