日本三级片在线观看视频_西西大胆午夜人体视频无码_少妇无码一区二区_亚洲天堂超碰_极品少妇被猛的白浆直流_91精品云霸高清中文字幕_草草五月天伊人_久久少妇无码专区_欧美激欧美啪啪5老太_日韩在线在线成人

PHP大小寫轉(zhuǎn)換詳解

2019-01-09 04:22:28 7021

strtoupper()


所有字母變大寫




strtolower()


所有字母變小寫




ucwords()


每個單詞的首字母轉(zhuǎn)換為大寫




ucfirst()


第一個單詞首字母變大寫




lcfirst()


第一個單詞首字母變小寫




示例:


$foo = 'hello world!';

$foo = ucwords($foo);             // Hello World!

 

$bar = 'HELLO WORLD!';

$bar = ucwords($bar);             // HELLO WORLD!

$bar = ucwords(strtolower($bar)); // Hello World!

 

$foo = 'hello world!';

$foo = ucfirst($foo);             // Hello world!

 

$bar = 'HELLO WORLD!';

$bar = ucfirst($bar);             // HELLO WORLD!

$bar = ucfirst(strtolower($bar)); // Hello world!

 

$foo = 'HelloWorld';

$foo = lcfirst($foo);             // helloWorld

 

$bar = 'HELLO WORLD!';

$bar = lcfirst($bar);             // hELLO WORLD!

$bar = lcfirst(strtoupper($bar)); // hELLO WORLD!


提交成功!非常感謝您的反饋,我們會繼續(xù)努力做到更好!

這條文檔是否有幫助解決問題?

非常抱歉未能幫助到您。為了給您提供更好的服務,我們很需要您進一步的反饋信息:

在文檔使用中是否遇到以下問題: