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 are magic constants in php?
What is encapsulation in php?
how to track no of users logged in?
What does the php error 'parse error in php - unexpected t_variable at line x' means?
How to include a file code in different files in php?
What are the popular frameworks in php?
Which is the latest version of php?
What are the methods useful for method overloading?
What is $_ get?
What is difference between rest and http?
What is the role of php.ini file?
What does echo mean in php?
How to connect to mysql from a php script?
What are the characteristics of php variables?
Which php function will attach one file to another?