使用ucwords函数将字符串中的每个单词的首字母大写的示例代码是什么?
发布时间:2023-06-30 09:42:22
$str = "hello world!";
$str = ucwords($str);
echo $str; // Output: Hello World!
$str = "hello world!";
$str = ucwords($str);
echo $str; // Output: Hello World!