久久久久久久视色,久久电影免费精品,中文亚洲欧美乱码在线观看,在线免费播放AV片

<center id="vfaef"><input id="vfaef"><table id="vfaef"></table></input></center>

    <p id="vfaef"><kbd id="vfaef"></kbd></p>

    
    
    <pre id="vfaef"><u id="vfaef"></u></pre>

      <thead id="vfaef"><input id="vfaef"></input></thead>

    1. 站長資訊網(wǎng)
      最全最豐富的資訊網(wǎng)站

      php語句單詞首字母大寫怎么轉(zhuǎn)換

      在PHP中,可以使用ucwords()函數(shù)將單詞首字母進行大寫轉(zhuǎn)換;該函數(shù)的作用是把字符串中每個單詞的首字母轉(zhuǎn)換為大寫,其語法為“ucwords(str)”,其參數(shù)str表示要轉(zhuǎn)換的字符串,使用時只需將字符串傳入str即可。

      php語句單詞首字母大寫怎么轉(zhuǎn)換

      本教程操作環(huán)境:windows7系統(tǒng)、PHP7.1版,DELL G3電腦

      在PHP中,可以使用ucwords()函數(shù)將單詞首字母進行大寫轉(zhuǎn)換。

      ucwords() 函數(shù)把字符串中每個單詞的首字符轉(zhuǎn)換為大寫。

      注釋:該函數(shù)是二進制安全的。

      語法

      ucwords(string)

      參數(shù)string :必需。規(guī)定要轉(zhuǎn)換的字符串。

      返回值:返回已轉(zhuǎn)換的字符串。

      代碼示例:

      <?php $foo = 'hello world!'; $foo = ucwords($foo);             // Hello World! echo $foo."<br>";  $bar = 'HELLO WORLD!'; $bar = ucwords($bar);             // HELLO WORLD! echo $bar."<br>"; $bar = ucwords(strtolower($bar)); // Hello World! echo $bar; ?>

      輸出:

      Hello World! HELLO WORLD! Hello World!

      推薦學(xué)習(xí):《PHP視頻教程》

      贊(0)
      分享到: 更多 (0)
      網(wǎng)站地圖   滬ICP備18035694號-2    滬公網(wǎng)安備31011702889846號