How to calculate the number of days in month

Hi

ALL

<?php
$m= date(“m”);
echo $m;
?>

Output:- 02

In the above code I am getting the month from the system date. Now I want to get the no of days in that month. How to do this

Please help me out

Thanks
MD.Samiuddin

This will help you, regarding your problem…

http://php.net/manual/en/function.cal-days-in-month.php

You can also use date('t'), the full list of available format characters can be found (conveniently enough) on the manual page for the date() function.

Thanks for your reply

Salathe
venkat6134

It help me out to get solution

Thanks & Regards

MD.Samiuddin

hello…
try this
$a=date(“j”); or
$b=date(“L”);