getdate(month) but display in short 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
valen53
Forum Contributor
Posts: 137
Joined: Tue Aug 27, 2002 9:29 am

getdate(month) but display in short month

Post by valen53 »

getdate(month), the result if this month is June. but i wish to display in Jun. any method can do that ?
User avatar
discobean
Forum Commoner
Posts: 49
Joined: Sun May 18, 2003 9:06 pm
Location: Sydney, Australia
Contact:

Post by discobean »

$short_month = substr ($long_month, 0, 3)
User avatar
twigletmac
Her Royal Site Adminness
Posts: 5371
Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK

Post by twigletmac »

You could also do:

Code: Select all

date('M');
http://php.net/manual/function.date.php

Mac
Post Reply