php capitalize second letter in sentence min 10 characters long
问题 Hello I have a project where I need to cApitalize only the second letter in a sentence. I now that PHP has strtoupper() and string strtoupper ( string $string ) ucfirst() returns first letter So here is my best attempt <?php $str = "capitalize"; $str = ucfirst(strtolower($str)); // makes all the letters lower case ?> This is where I get confused if 0 = the first letter and 1= 2nd then could I just make an array(") or count_chars() then $val 回答1: Its a old question, just came across this so