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 the use of "echo" in php?
In PHP, fgets() is used to read a file one line at a time. State Whether True or False?
How many columns can be added in a table in mysql?
What is xss in php?
What are the different filter functions used to filter a variable?
Name some of the functions in php.
What language is similar to php?
Does wordpress run on php 7?
What does explode do in php?
How to strip whitespace (or other characters) from the beginning and end of a string?
What does php do?
How do I get csrf token?
How do you create an array in php?
Does php class need constructor?
What is the function file_get_contents() useful for?