Im trying to display my Date field from my MySQL database.
format is 2012-01-01 to 2012-01-31
Is there a way to display the month of January to 0 instead of 1?
I used strtotime to change its format
date('Y, n, j',strtotime($s['date']))
but this showed
2012, 1, 1
I want to display this as
2012, 0, 1
You can always do something like:
Not sure this is the best/only way, but it should work.
EDIT: davidethell’s point taken, code changed accordingly. +1 for the comment.