strftime在PHP中生成第一个字母大写(大写)

use*_*668 6 php strftime

我有代码:

<?php echo strftime("%Y %B %e, %A")?>
Run Code Online (Sandbox Code Playgroud)

在某些语言中我得到:

2012年junio 3,多明戈

我希望所有单词的首字母大写(大写),所以它看起来像:

2012 Junio 3,多明戈

我没有在互联网上找到任何答案,有人有想法吗?:)

Sim*_*one 15

尝试 echo ucwords(strftime("%Y %B %e, %A"));

http://php.net/manual/en/function.ucwords.php


Utk*_*nos 5

echo ucwords(strftime("%Y %B %e, %A"));
Run Code Online (Sandbox Code Playgroud)