<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>

                ThinkChat2.0新版上線,更智能更精彩,支持會話、畫圖、視頻、閱讀、搜索等,送10W Token,即刻開啟你的AI之旅 廣告
                # PHP 5 echo 和 print 語句 **在 PHP 中,有兩種基本的輸出方法:echo 和 print。** 在本教程中,我們幾乎在每個例子中都會用到 echo 和 print。因此,本節為您講解更多關于這兩條輸出語句的知識。 ## PHP echo 和 print 語句 echo 和 print 之間的差異: * echo - 能夠輸出一個以上的字符串 * print - 只能輸出一個字符串,并始終返回 1 提示:echo 比 print 稍快,因為它不返回任何值。 ## PHP echo 語句 echo 是一個語言結構,有無括號均可使用:echo 或 echo()。 ### 顯示字符串 下面的例子展示如何用 echo 命令來顯示不同的字符串(同時請注意字符串中能包含 HTML 標記): ``` <?php echo "<h2>PHP is fun!</h2>"; echo "Hello world!<br>"; echo "I'm about to learn PHP!<br>"; echo "This", " string", " was", " made", " with multiple parameters."; ?> ``` ### 顯示變量 下面的例子展示如何用 echo 命令來顯示字符串和變量: ``` <?php $txt1="Learn PHP"; $txt2="W3School.com.cn"; $cars=array("Volvo","BMW","SAAB"); echo $txt1; echo "<br>"; echo "Study PHP at $txt2"; echo "My car is a {$cars[0]}"; ?> ``` ## PHP print 語句 print 也是語言結構,有無括號均可使用:print 或 print()。 ### 顯示字符串 下面的例子展示如何用 print 命令來顯示不同的字符串(同時請注意字符串中能包含 HTML 標記): ``` <?php print "<h2>PHP is fun!</h2>"; print "Hello world!<br>"; print "I'm about to learn PHP!"; ?> ``` ### 顯示變量 下面的例子展示如何用 print 命令來顯示字符串和變量: ``` <?php $txt1="Learn PHP"; $txt2="W3School.com.cn"; $cars=array("Volvo","BMW","SAAB"); print $txt1; print "<br>"; print "Study PHP at $txt2"; print "My car is a {$cars[0]}"; ?> ```
                  <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>

                              哎呀哎呀视频在线观看