Reputation: 629
I can't work out why a date won't format how I want, I'm using:
date("F jS Y \a\t g:i a")
expecting to get:
August 11th 2015 _at_ 9:59 am
But instead I get:
August 11th 2015 _a_ 9:59 am
I can't figure out what I am doing wrong!
Upvotes: 1
Views: 40
Reputation: 59701
\t
is an escape sequence and you have to escape it twice, otherwise PHP thinks it is a tab.
Like this:
date("F jS Y \a\\t g:i a")
//^^ See here
Upvotes: 4