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
Is php class name case sensitive?
What's php?
What are form input html tags?
Tell me what does $_env means?
What is the difference between pop3 IMAP and MAPI?
What is csrf token and why it is required?
What is the $_ server php_self variable?
Why php is used in html?
How do I start a php session?
How to create a mysql connection in php?
How to move uploaded files to permanent directory?
How to write in a file in php?
Can you define an argument as a reference type?
Is laravel an oop?
What is the major php security hole? How to avoid?