How to get the last date of the current month in PHP

1 Answer

0 votes
$last_date_of_current_month = date('Y-m-t');
   
echo $last_date_of_current_month;




/*
run:

2023-12-31

*/

 



answered Dec 1, 2023 by avibootz

Related questions

2 answers 174 views
1 answer 156 views
156 views asked Mar 25, 2022 by avibootz
1 answer 158 views
1 answer 177 views
1 answer 164 views
1 answer 260 views
...