久久久久久久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 個(gè) foreach 結(jié)果

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

          <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 個(gè) foreach 結(jié)果的處理方法,對(duì)大家解決問(wèn)題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來(lái)一起學(xué)習(xí)吧!

                  問(wèn)題描述

                  我有如下腳本

                  $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;
                  ?>
                  

                  它以長(zhǎng)水平線顯示所有結(jié)果我如何打破結(jié)果以便它們顯示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.

                  推薦答案

                  添加一個(gè)計(jì)數(shù)器并在每次達(dá)到 3 的倍數(shù)時(shí)開(kāi)始新行.

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

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

                  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.

                  這篇關(guān)于每行僅顯示 3 個(gè) foreach 結(jié)果的文章就介紹到這了,希望我們推薦的答案對(duì)大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

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

                  相關(guān)文檔推薦

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

                  <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. 主站蜘蛛池模板: 国产视频一区二区在线观看 | 亚洲高清在线 | 欧美日韩一区二区视频在线观看 | 国产精品五月天 | 成人国产精品久久 | 国产午夜精品一区二区三区在线观看 | 999国产视频 | 国产激情一区二区三区 | 夜夜操av | a久久| 99re热这里只有精品视频 | 高清国产一区二区 | 国产亚洲欧美在线视频 | 国产99视频精品免费播放照片 | 综合五月婷 | 国产不卡在线观看 | 国产高清一二三区 | 九九亚洲| 亚洲精品短视频 | 第一区在线观看免费国语入口 | 国产精品美女久久久免费 | 亚洲丝袜天堂 | 午夜成人免费视频 | 免费国产一区 | 久久久久久免费免费 | 日韩一区二区三区在线播放 | 中文字幕在线电影观看 | 一区二区三区四区不卡视频 | 日韩成人免费av | 日韩和的一区二区 | 成人精品视频在线观看 | 四虎影音 | 日本在线黄色 | 日本激情一区二区 | 日韩成人免费视频 | 在线观看视频一区二区三区 | 日本三级电影免费观看 | 91久久 | 精品国产精品一区二区夜夜嗨 | 国产精品亚洲视频 | 中文字幕国产精品 |