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

  • <small id='ICbgs'></small><noframes id='ICbgs'>

      • <bdo id='ICbgs'></bdo><ul id='ICbgs'></ul>
    1. <legend id='ICbgs'><style id='ICbgs'><dir id='ICbgs'><q id='ICbgs'></q></dir></style></legend>

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

        PHP foreach 循環(huán)鍵值

        PHP foreach loop key value(PHP foreach 循環(huán)鍵值)
        • <bdo id='cdadu'></bdo><ul id='cdadu'></ul>

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

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

                    <tbody id='cdadu'></tbody>
                  本文介紹了PHP foreach 循環(huán)鍵值的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!

                  問題描述

                  我正在運行這個數(shù)據(jù)庫調(diào)用來獲取多維數(shù)組我正在嘗試獲取每個鍵的鍵,但是當我嘗試時它出現(xiàn)空白或數(shù)組.

                  I am running this DB call to get me multi-dimensional array I am trying to get the keys of each but when I try it comes up blank or as array.

                  $root_array = array();
                  $sites = $this->sites($member_id);
                  foreach ($sites as $site){
                      $records = $this->db->select('p.name as place_name, p.id as place_id,p.active as place_status')
                                  ->from('places p')
                                  ->join('members_permissions pm','pm.sites_id = p.sites_id and pm.members_id ='.$member_id)
                                  ->where('p.active', 0)
                                  ->get();
                  
                      $places = $records->result_array();
                      $places['name'] = $site['name'];
                      foreach($places as $place){
                         $root_array[$site['name']][] = $place;
                      }
                  
                  }
                  return $root_array;
                  

                  這是我的 php 循環(huán):

                  here is my php that loops through:

                  <?php foreach($places as $site): ?>
                      <h5><?=key($site)?></h5>
                          <?php foreach($site as $place): ?>
                              <h6><?=$place['place_name']?></h6>
                          <?php endforeach?>
                  
                  <?php endforeach ?>
                  

                  此外,當我運行一個只是吐出數(shù)組的測試時,這就是結(jié)果,我試圖呈現(xiàn)的是[費城]

                  Also when I run a test which just spits out the array this is the result, What I am trying to render is [Philadelphia]

                  [Philadelphia] => Array
                          (
                              [0] => Array
                                  (
                                      [place_name] => XYX
                                      [place_id] => 103200
                                      [place_status] => 0
                                  )
                  
                              [1] => Array
                                  (
                                  [place_name] => YYYY
                                  [place_id] => 232323
                                  [place_status] => 0
                              )
                  

                  推薦答案

                  你可以像這樣訪問你的數(shù)組鍵:

                  You can access your array keys like so:

                  foreach ($array as $key => $value)
                  

                  這篇關(guān)于PHP foreach 循環(huán)鍵值的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

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

                  相關(guān)文檔推薦

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

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

                          <tfoot id='oW3P6'></tfoot>
                            <tbody id='oW3P6'></tbody>

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

                          • 主站蜘蛛池模板: 91麻豆精品国产91久久久更新资源速度超快 | 成人av在线播放 | 中文字幕在线视频免费观看 | 精品免费视频一区二区 | 久久久精品一区二区三区 | 国产视频线观看永久免费 | 中文久久 | 国产乱码高清区二区三区在线 | 不卡一区二区三区四区 | 天天综合干| 亚洲成人观看 | 青青久久 | 国产精品视频97 | 国产精品久久久久久久久久妇女 | 日日操视频 | 69电影网| 日韩在线免费电影 | 欧洲一级毛片 | 成人免费在线视频 | 欧美精品一区二区在线观看 | 偷拍亚洲色图 | 亚洲精彩视频在线观看 | 激情五月综合 | 国产欧美一区二区在线观看 | 国产精品久久久久久久久久久久久久 | 久久视频免费观看 | 久久久国产一区二区三区 | 国产伦一区二区三区 | 91网视频 | 午夜精品一区二区三区在线观看 | 三级在线免费 | 天天草视频 | 久草在线在线精品观看 | 精品中文字幕一区二区 | 欧美性网 | 欧美日韩久久 | 日韩高清国产一区在线 | 91影视 | 免费一级大片 | 91视频三区 | 国产精品视频不卡 |