Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

What is the difference between php4 and php5?

1076


What is the difference between associative array and indexed array?

1096


What is php7?

1085


What distinguishes php from something like client side java script?

1041


What is difference between mysql_connect and mysqli_connect?

1034


What is php addslashes?

1108


What is the different between count() and sizeof() in php?

957


Can we set session value in javascript?

1058


What is difference between ksort() and usort() functions.

930


Is php better than java?

986


How to get useful error messages in php?

1063


What are the different types of PHP arrays?

1079


How to fix "headers already sent" error in php

1066


How can you associate a variable with a session?

1024


How can we upload a file in php?

1021