<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                合規國際互聯網加速 OSASE為企業客戶提供高速穩定SD-WAN國際加速解決方案。 廣告
                1.使用強制類型轉換,語法“(string)數字”; 2.使用strval()函數,語法“strval(數字)”; 3.使用settype()函數,語法“settype(數字, "string")”。 ~~~ ##以下為拓展看了心煩 PHP的數據類型轉換屬于強制轉換,允許轉換的PHP數據類型有: (int)、(integer):轉換成整形 (float)、(double)、(real):轉換成浮點型 (string):轉換成字符串 (bool)、(boolean):轉換成布爾類型 (array):轉換成數組 (object):轉換成對象 PHP數據類型有三種轉換方式: 在要轉換的變量之前加上用括號括起來的目標類型 使用3個具體類型的轉換函數,intval()、floatval()、strval() 使用通用類型轉換函數settype(mixed var,string type) 第一種轉換方式: (int) (bool) (float) (string) (array) (object) <?php $num1=3.14; $num2=(int)$num1; var_dump($num1); //輸出float(3.14) var_dump($num2); //輸出int(3) ?> 第二種轉換方式: intval() floatval() strval() <?php $str="123.9abc"; $int=intval($str); //轉換后數值:123 $float=floatval($str); //轉換后數值:123.9 $str=strval($float); //轉換后字符串:"123.9" ?> 第三種轉換方式: settype(); <?php $num4=12.8; $flg=settype($num4,"int"); var_dump($flg); //輸出bool(true) var_dump($num4); //輸出int(12) ?> 補充: 判斷字符串全部由數字組成 <?php $str = "123" if(ereg('^[0-9]+$', $str)) { // true } ?> ~~~
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看