## ucfirst 將字符串的首字母轉換為大寫
將 str 的首字符(如果首字符是字母)轉換為大寫字母,并返回這個字符串。
~~~
string ucfirst ( string $str )
~~~
**eg**
~~~
<?php
$foo = 'hello world!';
$foo = ucfirst($foo); // Hello world!
$bar = 'HELLO WORLD!';
$bar = ucfirst($bar); // HELLO WORLD!
$bar = ucfirst(strtolower($bar)); // Hello world!
?>
~~~
## lcfirst使一個字符串的第一個字符小寫
**eg**
~~~
<?php
$foo = 'HelloWorld';
$foo = lcfirst($foo); // helloWorld
$bar = 'HELLO WORLD!';
$bar = lcfirst($bar); // hELLO WORLD!
$bar = lcfirst(strtoupper($bar)); // hELLO WORLD!
?>
~~~