我试图完成以下任务:
$string = "i want to convert this string to the following";
Run Code Online (Sandbox Code Playgroud)
并将其转换为如下所示:
echo $string;
// I Want TO Convert This String TO THE Following
Run Code Online (Sandbox Code Playgroud)
因此:将字符串中所有单词的首字母大写,如果一个单词不超过3个字符,则将整个单词都大写。PHP如何无法做到这一点?
php ×1