Popular Posts

Monday, April 6, 2009

How to display the last day of the month on your website?

A very easy way to display the last day of the month on your website with a PHP code that you will add in your document. All you have to do is to add “$m” to refer to the month and “$y” to the year. To be able to display the day, you can use the “t” code as explained in the example below:

$ month = mktime (0, 0, 0, $ m, 1, $ y);
setlocale ( 'LC_ALL', 'en_US');
echo "month". date ( "FY", $ month). "owns". date ( "t", $ month). "days";
>

No comments:

Post a Comment

HOME : SHARE YOUR IDEAS