73.0k views
0 votes
What is the PHP coding for determining if leap year or not?​

User Yanex
by
4.6k points

1 Answer

3 votes

Answer:

<!DOCTYPE html>

<html>

<body>

<?php

$year = 2032;

if((0 == $year % 4) & (0 != $year % 100) | (0 == $year % 400))

{

echo "$year is a Leap Year.";

}

else

{

echo "$year is not a Leap Year.";

}

?>

</body>

</html>

Step-by-step explanation:

User Arush Kamboj
by
5.3k points