PHP转换大小写字母
使用函数如下:ucwords():将每个单词首字母转换为大写。ucfirst():将第一个单词首字母转为大写。lcfirst():将第一个单词首字母转为小写。strtoupper():将所有字母转为大写。strtolower():将所有字母转为小写。
echo ucwords("hello world");
//Hello World
echo ucfirst("hello world");
//Hello world
echo lcfirst("HELLO WORLD");
//hELLO WORLD
echo strtoupper("hello world");
//HELLO WORLD
echo strtolower("HELLO WORLD");
//hello world