last day of a month

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
pelegk2
Forum Regular
Posts: 633
Joined: Thu Nov 27, 2003 5:02 am
Location: Israel - the best place to live in after heaven
Contact:

last day of a month

Post by pelegk2 »

is there a way to get the last day of the month withought buikding a function - something that is ready made
so in :
jenuay i will get 313
february 28 and so on
thnaks in adbvance
peleg
User avatar
Weirdan
Moderator
Posts: 5978
Joined: Mon Nov 03, 2003 6:13 pm
Location: Odessa, Ukraine

Post by Weirdan »

Code: Select all

echo date('r', mktime(0,0,0,date('n')+1,0, date('Y')));
References:
  • [php_man]date[/php_man]
  • [php_man]mktime[/php_man]
User avatar
pelegk2
Forum Regular
Posts: 633
Joined: Thu Nov 27, 2003 5:02 am
Location: Israel - the best place to live in after heaven
Contact:

Post by pelegk2 »

very cool man all the reesults on goole were functions with lots of code
Post Reply