久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

    <bdo id='KGxPE'></bdo><ul id='KGxPE'></ul>

      <legend id='KGxPE'><style id='KGxPE'><dir id='KGxPE'><q id='KGxPE'></q></dir></style></legend>
      1. <i id='KGxPE'><tr id='KGxPE'><dt id='KGxPE'><q id='KGxPE'><span id='KGxPE'><b id='KGxPE'><form id='KGxPE'><ins id='KGxPE'></ins><ul id='KGxPE'></ul><sub id='KGxPE'></sub></form><legend id='KGxPE'></legend><bdo id='KGxPE'><pre id='KGxPE'><center id='KGxPE'></center></pre></bdo></b><th id='KGxPE'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='KGxPE'><tfoot id='KGxPE'></tfoot><dl id='KGxPE'><fieldset id='KGxPE'></fieldset></dl></div>
        <tfoot id='KGxPE'></tfoot>

        <small id='KGxPE'></small><noframes id='KGxPE'>

        每行僅顯示 3 個 foreach 結果

        display only 3 foreach result per row(每行僅顯示 3 個 foreach 結果)

          <tfoot id='AohiG'></tfoot>

                  <tbody id='AohiG'></tbody>
                <legend id='AohiG'><style id='AohiG'><dir id='AohiG'><q id='AohiG'></q></dir></style></legend>
                  <bdo id='AohiG'></bdo><ul id='AohiG'></ul>

                  <small id='AohiG'></small><noframes id='AohiG'>

                  <i id='AohiG'><tr id='AohiG'><dt id='AohiG'><q id='AohiG'><span id='AohiG'><b id='AohiG'><form id='AohiG'><ins id='AohiG'></ins><ul id='AohiG'></ul><sub id='AohiG'></sub></form><legend id='AohiG'></legend><bdo id='AohiG'><pre id='AohiG'><center id='AohiG'></center></pre></bdo></b><th id='AohiG'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='AohiG'><tfoot id='AohiG'></tfoot><dl id='AohiG'><fieldset id='AohiG'></fieldset></dl></div>
                • 本文介紹了每行僅顯示 3 個 foreach 結果的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  我有如下腳本

                  $output="<table class='products'><tr>"; 
                  while($info = mysql_fetch_array( $data )) { 
                      //Outputs the image and other data
                      $output.= "<td>
                      <img src=http://localhost/zack/sqlphotostore/images/"   .$info['photo'] ." width=323px ></img> 
                      <b>Name:</b> ".$info['name'] . "
                      <b>Email:</b> ".$info['email'] . " 
                      <b>Phone:</b> ".$info['phone'] . "</td> "; 
                  }
                  $output.="<tr></table>";
                  print $output;
                  ?>
                  

                  它以長水平線顯示所有結果我如何打破結果以便它們顯示3 次后在新行中.

                  it shows all results in long horizontal line how do i break the results so that they show in new row after 3 count.

                  推薦答案

                  添加一個計數器并在每次達到 3 的倍數時開始新行.

                  Add a counter and start a new row every time it reaches a multiple of 3.

                  $counter = 0;
                  while($info = mysql_fetch_array($data)) {
                     if ($counter++ % 3 == 0) {
                         if ($counter > 0) {
                             $output .= "</tr>";
                         }
                         $output .= "<tr>";
                     }
                     // stuff
                  }
                  if ($counter > 0) {
                      $output .= "</tr>";
                  }
                  
                  $output .= "</table>";
                  

                  請注意:它可能無法回答您的問題,但您應該停止使用 mysql_* 函數.它們正在被棄用.而是使用 PDO(自 PHP 5.1 起支持)或 mysqli(自 PHP 4.1 起支持).如果您不確定使用哪個,閱讀這篇文章.

                  Please note: It may not help answer your question, but you should stop using mysql_* functions. They're being deprecated. Instead use PDO (supported as of PHP 5.1) or mysqli (supported as of PHP 4.1). If you're not sure which one to use, read this article.

                  這篇關于每行僅顯示 3 個 foreach 結果的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

                  【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

                  相關文檔推薦

                  MySQLi prepared statement amp; foreach loop(MySQLi準備好的語句amp;foreach 循環)
                  Is mysqli_insert_id() gets record from whole server or from same user?(mysqli_insert_id() 是從整個服務器還是從同一用戶獲取記錄?)
                  PHP MySQLi doesn#39;t recognize login info(PHP MySQLi 無法識別登錄信息)
                  mysqli_select_db() expects exactly 2 parameters(mysqli_select_db() 需要 2 個參數)
                  Php mysql pdo query: fill up variable with query result(Php mysql pdo 查詢:用查詢結果填充變量)
                  MySQLI 28000/1045 Access denied for user #39;root#39;@#39;localhost#39;(MySQLI 28000/1045 用戶“root@“localhost的訪問被拒絕)

                  <tfoot id='5ov1c'></tfoot>
                      • <bdo id='5ov1c'></bdo><ul id='5ov1c'></ul>
                        <i id='5ov1c'><tr id='5ov1c'><dt id='5ov1c'><q id='5ov1c'><span id='5ov1c'><b id='5ov1c'><form id='5ov1c'><ins id='5ov1c'></ins><ul id='5ov1c'></ul><sub id='5ov1c'></sub></form><legend id='5ov1c'></legend><bdo id='5ov1c'><pre id='5ov1c'><center id='5ov1c'></center></pre></bdo></b><th id='5ov1c'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='5ov1c'><tfoot id='5ov1c'></tfoot><dl id='5ov1c'><fieldset id='5ov1c'></fieldset></dl></div>

                          <legend id='5ov1c'><style id='5ov1c'><dir id='5ov1c'><q id='5ov1c'></q></dir></style></legend>

                          <small id='5ov1c'></small><noframes id='5ov1c'>

                            <tbody id='5ov1c'></tbody>
                          1. 主站蜘蛛池模板: 国产成人精品午夜视频免费 | 超碰免费在线观看 | 欧美xxxx色视频在线观看免费 | 91精品免费视频 | 91看片在线观看 | 亚洲精品高清视频 | av中文天堂 | 九九国产在线观看 | 在线国产视频 | 日韩成人免费视频 | 亚洲91精品 | 欧美精品久久 | 久产久精国产品 | 国产探花在线精品一区二区 | 国产伦精品一区二区三区视频金莲 | 欧美日韩不卡合集视频 | 久久亚洲春色中文字幕久久久 | 水蜜桃久久夜色精品一区 | 亚洲乱码国产乱码精品精的特点 | 日本不卡免费新一二三区 | 日韩在线视频一区 | 欧美激情综合色综合啪啪五月 | 久久久久久国产精品 | 欧美精品久久久 | 久久久久久91香蕉国产 | 国产精品久久久免费 | 国产高清在线观看 | 蜜桃臀av一区二区三区 | 手机av在线 | 国产a区| 欧美精三区欧美精三区 | 日韩三极 | 国产欧美精品一区二区色综合朱莉 | 91亚洲国产成人久久精品网站 | 日韩二区 | 日本精品视频在线 | 久久99精品久久久久久狂牛 | 久久久久久亚洲精品 | 国产一级黄色网 | 精品久久电影 | 欧美看片|