摘要: header('Content-Type: text/html; charset=utf-8'); $a1=array(1=>array("Cat"=>1),3=>array("Dog"=>2),5=>array("Horse"=>6));$a2=array(1,5);echo "";print_r(array_intersect_key($a1,array_flip($a2))); //array_flip键值互换,array_intersect_key根据键值 阅读全文
posted @ 2014-02-27 18:35 IT使者 阅读(284) 评论(0) 推荐(0) 编辑
摘要: '; //原始数组格式 $array = array( 'key1' => array( 'item1' => '65', 'item2' => '35', 'item3' => '84', ), 'key2' => array( 'item1' => '24', ), 'key3' => array( 'item1' => '38' 阅读全文
posted @ 2014-02-27 14:17 IT使者 阅读(336) 评论(0) 推荐(0) 编辑