下面的PHP代码以这种格式返回日期:
2010年7月27日下午7:36
我怎么能用大写字母返回日期?这就是我想要的;
2010年7月27日下午7:36
提前致谢,
约翰
PHP代码:
format('F j, Y &\nb\sp &\nb\sp g:i a')
Run Code Online (Sandbox Code Playgroud)
该strtoupper()函数中的所有字符转换一个字符串为大写.您可以通过以下方式使用它:
strtoupper(format('F j, Y &\nb\sp &\nb\sp g:i a'));
Run Code Online (Sandbox Code Playgroud)
如果您对空间有问题,请记住它 .插入大写字母可能也不起作用.您可以尝试以下方法:
strtoupper(format('F j, Y'))." ".strtoupper(format('g:i a'));
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
8437 次 |
| 最近记录: |