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 are php data types?

506


What are include() and require() functions?

511


my english is not too good then what we apply for a php programer post

2012


Explain which cryptographic extension provide generation and verification of digital signatures?

520


Are php sessions cookies?

503






What is the use of mysql_fetch_array in php?

499


What is scope of variable in php?

567


What are interfaces in php?

512


Explain Booleans in PHP?

624


What is crypt () in php?

481


How I can control asset documents without GR/IR?

1201


What is final keyword in php?

538


What is the goto statement useful for?

543


Tell me how stop the execution of a php scrip?

519


sort term descripttion form, report and uery

1645