The PHP code below returns dates in this format:
July 27, 2010 7:36 pm
How could I make it return dates with capital letters? Here's what I want;
JULY 27, 2010 7开发者_高级运维:36 PM
Thanks in advance,
John
The PHP code:
format('F j, Y &\nb\sp &\nb\sp g:i a')
The strtoupper() function converts all the characters in a string to uppercase. You can use it in the following way:
strtoupper(format('F j, Y &\nb\sp &\nb\sp g:i a'));
If you have having problems with the spaces, remember that it's
. Inserting capitals there might not work either. You could try the following:
strtoupper(format('F j, Y'))." ".strtoupper(format('g:i a'));
精彩评论