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
List types of array are available in php?
What is the ioncube php loader?
Explain about looping in PHP?
Write a program to get second highest number in an array using php?
What does trim () do in javascript?
How can I learn php fast?
What is the use of $_server and $_env?
What is php built on?
What is php data type?
How is it possible to set an infinite execution time for php script?
How check submit button is clicked in php?
What is the php function that removes the first element of the array and returns it?
What are php keywords?
What is the delimiter default in PHP?
How to open a file in php?