Link to home
Start Free TrialLog in
Avatar of Jonathan Greenberg
Jonathan GreenbergFlag for United States of America

asked on

Help with php date formatting

I want a string of "10/01/2011" to be formatted as Oct 1, 2011 with php. How do I do this? Using strtotime()? Or srtftime()? Or date()?

I've done this before, but I can't quite seem to remember how. Thanks.
ASKER CERTIFIED SOLUTION
Avatar of Dave Baldwin
Dave Baldwin
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Jonathan Greenberg

ASKER

kshna and jocasio123, those work except the 'd' in the date() function needs to be a 'j' for the day to display without a leading zero (1 to 31).

Dave, thanks you for all your examples and for pointing out the potential locale issue.
You're welcome, glad to help.