How to create the PHP Script to Calculate the Age Using the
Inputs Of our Birth date and the Current date?

Answer Posted / nirav desai

<?php
$a = date('Y',strtotime('1985-10-15'));
$b = date('Y');
$c = $b-$a;
echo "Current age is:: ".$c." Years .";
?>

Is This Answer Correct ?    5 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is namespace and use in php?

530


What is boolean in php?

526


Explain me what is the meaning of a persistent cookie?

489


Is php a middleware?

517


Explain me what are the 3 scope levels available in php and how would you define them?

734






How can you send http header to the client in php?

504


Which php framework is in demand?

457


How do I run a php script in windows?

556


What is $_ env in php?

549


what is benefit of magento?

2035


How is it possible to set an infinite execution time for php script?

522


What is php used for?

526


How to track user logged out or not? When user is idle?

516


Are static variables final?

526


Is python similar to php?

550