PHP的 (首)字母大小写操作函数

$str = "This is 7woshi.com";  
echo "全部变小写 strtolower: ".strtolower($str);  
echo "第一个字母大写 ucfirst: ".ucfirst($str);  
echo "单词首字母大写 ucwords: ".ucwords($str);  
echo "全部变大写 strtoupper: ".strtoupper($str);  
// 5.3 以后, 支持lcfirst($str); //第一个字母小写


php全部变小写 strtolower: this is 7woshi .com
php第一个字母大写 ucfirst: This is 7woshi .com

php单词首字母大写 ucwords: This Is 7woshi .Com

php全部变大写 strtoupper: THIS IS 7WOSHI.COM

posted @ 2013-03-29 11:52  上帝爱编程  阅读(948)  评论(0编辑  收藏  举报