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
What software is required for php?
Why shouldn't I use mysql_* functions in php?
What are php string functions?
How can we submit a form without using submit buttons?
What is http php?
What is session cookies php?
What is difference between readonly and constant?
What is basename php?
Why delimiter is used in mysql?
What is difference between include,require,include_once and require_once()?
Explain the difference between urlencode and urldecode?
How can image properties be retrieved in php?
Why is php used for web development?
What websites use php?
How to enable error reporting in php?