To find out the current year is leap year or not which
date() function we've to use.Give the syntax also
Answer Posted / vaneet badhan
to check the current year code is :
date("L");
output will be 1 coz 2008 is a leap year.
better way to check is :
$year=2008;
echo date("L",mktime(1,1,1,1,1,$year));
now you can check any year by just changing the value of
variable $year, this is called dynamic programming.
| Is This Answer Correct ? | 4 Yes | 3 No |
Post New Answer View All Answers
Is it possible to extend the execution time of a php script?
Tell me how comparison of objects is done in php5?
Tell us how can we access the data sent through the url with the post method?
What is a persistent cookie in php?
What is composer used for?
How to read the entire file into a single string?
What is $_ post in php?
Which operator is used to combine string values in php?
write a note on Testing the web site
Is php pass by reference or value?
What does a dependant variable mean?
How can you declare the array in php?
Explain the difference between php4 and php5.
What is the correct php command to use to catch any error messages within the code?
What is the difference between for and foreach?