How to create the PHP Script to Calculate the Age Using the
Inputs Of our Birth date and the Current date?
Answer Posted / prakash.matte
<?php
$dob = '29-05-1986';
$age = date('Y') - date('Y', strtotime($dob));
if (date('md') < date('md', strtotime($dob))) {
$age--;
}
echo $age;
?>
Is This Answer Correct ? | 5 Yes | 2 No |
Post New Answer View All Answers
How to include a file code in different files in php?
How to get the http request in php?
How do I find environment variables?
Why die is used in php?
How to set session.gc_divisor properly?
What is curl php?
How is it possible to set an infinite execution time for php script?
Whether it is possible to share a single instance of a memcache between multiple php projects?
What is different types of visibility?
What types of loops exist in php?
What is php stack?
What is php and its uses?
Is php procedural or oop?
What is php oop?
Is php 5.6 secure?