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

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

    <tfoot id='p8NIL'></tfoot>

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

    2. 從while循環中獲取計數器的更簡單方法?

      easier way to get counter from while loop?(從while循環中獲取計數器的更簡單方法?)
      <i id='CZzr9'><tr id='CZzr9'><dt id='CZzr9'><q id='CZzr9'><span id='CZzr9'><b id='CZzr9'><form id='CZzr9'><ins id='CZzr9'></ins><ul id='CZzr9'></ul><sub id='CZzr9'></sub></form><legend id='CZzr9'></legend><bdo id='CZzr9'><pre id='CZzr9'><center id='CZzr9'></center></pre></bdo></b><th id='CZzr9'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='CZzr9'><tfoot id='CZzr9'></tfoot><dl id='CZzr9'><fieldset id='CZzr9'></fieldset></dl></div>
          • <bdo id='CZzr9'></bdo><ul id='CZzr9'></ul>

                <tbody id='CZzr9'></tbody>
            1. <small id='CZzr9'></small><noframes id='CZzr9'>

                <legend id='CZzr9'><style id='CZzr9'><dir id='CZzr9'><q id='CZzr9'></q></dir></style></legend>

                <tfoot id='CZzr9'></tfoot>
                本文介紹了從while循環中獲取計數器的更簡單方法?的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                問題描述

                我有以下幾點:

                $counter = 1;   
                while($row= mysql_fetch_assoc($result)) {
                    $counter2 = $counter++;
                
                    echo($counter2 . $row['foo']);
                }
                

                是否有更簡單的方法可以為每個結果獲得 1、2、3 等,或者這是最好的方法?

                Is there an easier way to get 1,2,3 etc for each result or is this the best way?

                謝謝

                推薦答案

                你不需要 $counter2.$counter++ 很好.如果您使用 preincrement 而不是 postincrement,您甚至可以在與 echo 相同的行上執行此操作.

                You don't need $counter2. $counter++ is fine. You can even do it on the same line as the echo if you use preincrement instead of postincrement.

                $counter = 0;   
                while($row= mysql_fetch_assoc($result)) {
                    echo(++$counter . $row['foo']);
                }
                

                這篇關于從while循環中獲取計數器的更簡單方法?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持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='PFwC9'></tfoot>
                <legend id='PFwC9'><style id='PFwC9'><dir id='PFwC9'><q id='PFwC9'></q></dir></style></legend>
                    <tbody id='PFwC9'></tbody>
                    <bdo id='PFwC9'></bdo><ul id='PFwC9'></ul>

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

                        • 主站蜘蛛池模板: 国产精品不卡视频 | 自拍视频网站 | 精品一区二区免费视频 | 国产午夜精品一区二区三区四区 | 91一区二区三区 | 国产激情视频在线观看 | 91中文在线观看 | 国产视频中文字幕 | 日韩视频中文字幕 | 一级毛片免费完整视频 | 国产9 9在线 | 中文 | 亚洲激情视频在线 | www.中文字幕.com | jvid精品资源在线观看 | 亚洲精品在线观 | 精品久久一区 | 国产精品一区二区福利视频 | 欧美一级淫片007 | 午夜精品导航 | 国内精品一区二区三区 | av免费网站在线观看 | 九九久久久 | 久久99精品久久久久久噜噜 | 成人 在线 | 午夜看片 | 久久国 | 牛牛热在线视频 | 国产一区二区精品在线观看 | 成人性视频免费网站 | 亚洲成人精品 | 亚洲人在线 | 欧美综合一区二区 | 91精品国产欧美一区二区成人 | 亚洲成人动漫在线观看 | 超碰av在线 | 亚洲美女一区二区三区 | 在线亚洲一区二区 | 国产乱码精品一区二区三区忘忧草 | 综合久久综合久久 | 成人av鲁丝片一区二区小说 | 成人在线免费网站 |