久久久久久久视色,久久电影免费精品,中文亚洲欧美乱码在线观看,在线免费播放AV片

<center id="vfaef"><input id="vfaef"><table id="vfaef"></table></input></center>

    <p id="vfaef"><kbd id="vfaef"></kbd></p>

    
    
    <pre id="vfaef"><u id="vfaef"></u></pre>

      <thead id="vfaef"><input id="vfaef"></input></thead>

    1. 站長資訊網(wǎng)
      最全最豐富的資訊網(wǎng)站

      分享幾個有意思的數(shù)組方法

      使用傳遞的數(shù)組遞歸替換第一個數(shù)組的元素 array_replace_recursive

      $base = array('citrus' => array( "orange") , 'berries' => array("blackberry", "raspberry"), ); $replacements = array('citrus' => array('pineapple'), 'berries' => array('blueberry')); $basket = array_replace_recursive($base, $replacements);

      分享幾個有意思的數(shù)組方法

      帶索引檢查計算數(shù)組的交集,用回調(diào)函數(shù)比較索引 array_intersect_uassoc

      $array1 = array("a" => "green", "b" => "brown", "c" => "blue", "red"); $array2 = array("a" => "GREEN", "B" => "brown", "yellow", "red"); print_r(array_intersect_uassoc($array1, $array2, "strcasecmp"));

      分享幾個有意思的數(shù)組方法

      遞歸地合并一個或多個數(shù)組 array_merge_recursive

      $ar1 = array("color" => array("favorite" => "red"), 5); $ar2 = array(10, "color" => array("favorite" => "green", "blue")); $result = array_merge_recursive($ar1, $ar2);

      分享幾個有意思的數(shù)組方法

      使用傳遞的數(shù)組遞歸替換第一個數(shù)組的元素 array_replace_recursive

      $base = array('citrus' => array( "orange") , 'berries' => array("blackberry", "raspberry"), ); $replacements = array('citrus' => array('pineapple'), 'berries' => array('blueberry')); $basket = array_replace_recursive($base, $replacements); print_r($basket);

      將一個線性數(shù)組轉(zhuǎn)換為一個樹,或者多維數(shù)組

      function array_stack (&$a, $p = '@parent', $c = '@children')     {       $l = $t = array();       foreach ($a AS $key => $val):         if (!$val[$p]) $t[$key] =& $l[$key];         else $l[$val[$p]][$c][$key] =& $l[$key];         $l[$key] = (array)$l[$key] + $val;       endforeach;       return $a = array('tree' => $t, 'leaf' => $l);     }     $node = array();     $node[1] = array('@parent' => 0, 'title' => 'I am node 1.');     $node[2] = array('@parent' => 1, 'title' => 'I am node 2.');     $node[3] = array('@parent' => 2, 'title' => 'I am node 3.');     $node[4] = array('@parent' => 1, 'title' => 'I am node 4.');     $node[5] = array('@parent' => 4, 'title' => 'I am node 5.');     print_r(array_stack($node));

      贊(0)
      分享到: 更多 (0)
      網(wǎng)站地圖   滬ICP備18035694號-2    滬公網(wǎng)安備31011702889846號