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 PDO?

1219


What is a php trait?

902


Difference between $message vs. $$Message in php.

962


How to know user has read the email-php?

903


Explain the difference between static and dynamic websites?

953


What exactly is PHP?

975


Is php session id unique?

939


How to remove all duplicate values in array in php?

934


What is isset in php form?

989


How to delete cookie files on your computer?

942


Do csrf tokens expire?

913


What is htmlentities function in php?

921


What is the current stable version of php?

1007


Explain how can php and javascript interact?

996


what the new feature add in php 7.2?

934