<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ??一站式輕松地調用各大LLM模型接口,支持GPT4、智譜、豆包、星火、月之暗面及文生圖、文生視頻 廣告
                # PHP array_walk_recursive() 函數 ## 定義和用法 與 [array_walk() 函數](/php/func_array_walk.asp "PHP array_walk() 函數") 類似,array_walk_recursive() 函數對數組中的每個元素應用回調函數。不一樣的是,如果原數組中的元素也是數組,就會遞歸地調用回調函數,也就是說,會遞歸到更深層的數組中去。 典型情況下,_function_ 接受兩個參數。_array_ 參數的值作為第一個,鍵名作為第二個。如果提供了可選參數 _userdata_ ,將被作為第三個參數傳遞給回調函數。 如果回調函數需要直接作用于數組中的值,可以將回調函數的第一個參數指定為引用,這樣對這些單元的任何改變也將會改變原始數組本身。 ### 語法 ``` array_walk_recursive(array,function,userdata) ``` | 參數 | 描述 | | --- | --- | | array | 必需。規定數組。 | | function | 必需。用戶自定義函數的名稱。 | | userdata | 可選。用戶輸入的值,可作為回調函數的參數。 | ## 例子 ``` <?php function myfunction($value,$key) { echo "The key $key has the value $value<br />"; } $a1=array("a"=>"Cat","b"=>"Dog"); $a2=array($a1,"1"=>"Bird","2"=>"Horse"); array_walk_recursive($a2,"myfunction"); ?> ``` 輸出: ``` The key a has the value Cat The key b has the value Dog The key 1 has the value Bird The key 2 has the value Horse ```
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看