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 php artisan serve?
What are the 3 scope levels available in php and how would you define them?
What are the different loops in php?
Name some of the popular frameworks in php.
What is putenv?
What are the two types of variables?
How can you send http header to the client in php?
Why php 7 is faster?
Is php used anymore?
What are examples of independent and dependent variables?
Applications written to provide a GUI shell for Unix and Linux are called
How is php different from other languages?
Which cryptographic functions in php returns the longest hash value?
What is fetch array in php?
What is the difference between substr() and strstr()?