<address id="ousso"></address>
<form id="ousso"><track id="ousso"><big id="ousso"></big></track></form>
  1. php遞歸遍歷多維數組的方法

    時間:2025-11-14 15:50:19 php語言 我要投稿

    php遞歸遍歷多維數組的方法

      文章主要介紹了php遞歸遍歷多維數組的方法,實例分析了php數組遍歷的相關技巧,具有一定參考借鑒價值,需要的朋友可以參考下.

      本文實例講述了php遞歸遍歷多維數組的方法。分享給大家供大家參考。具體如下:

      ?

      1

      2

      3

      4

      5

      6

      7

      8

      9

      10

      11

      12

      13

      14

      15

      <?php

      function get_array_elems($arrResult, $where="array"){

      while(list($key,$value)=each($arrResult)){

      if (is_array($value)){

      get_array_elems($value, $where."[$key]");

      }

      else {

      for ($i=0; $i<count($value);$i++){

      echo $where."[$key]=".$value."<BR>\n";

      }

      }

      }

      }

      get_array_elems($arrResult);

      ?>

      希望本文所述對大家的php程序設計有所幫助。

    【php遞歸遍歷多維數組的方法】相關文章:

    php遞歸遍歷刪除文件的方法11-05

    PHP使用遞歸算法無限遍歷數組示例09-03

    php遍歷數組的方法分享07-08

    PHP多維數組去掉重復值的方法02-10

    PHP 多維數組的排序問題12-06

    PHP遍歷目錄文件常用方法03-06

    thinkPHP簡單遍歷數組方法分析03-16

    php中數組的定義方法11-11

    php數組操作方法09-21

    • 相關推薦
    <address id="ousso"></address>
    <form id="ousso"><track id="ousso"><big id="ousso"></big></track></form>
    1. 日日做夜狠狠爱欧美黑人