$all = array(); $a = array("Horse" = "0", "Dog" = "1", "Cat" = "2"); $b = array("Horse" = "A", "Dog" = "B", "Cat" = "C"); $c = array("Horse" = "A1", "Dog" = "B2", "Cat" = "C3"); $all["123456"]["511"] = $a; $all["123456"]["523"] = $b; $all[
$all = array();
$a = array("Horse" => "0", "Dog" => "1", "Cat" => "2");
$b = array("Horse" => "A", "Dog" => "B", "Cat" => "C");
$c = array("Horse" => "A1", "Dog" => "B2", "Cat" => "C3");
$all["123456"]["511"] = $a;
$all["123456"]["523"] = $b;
$all["123456"]["607"] = $c;
var_dump($all);
输入:
请教怎样通过一个函数实现根据一个“键名”获取到同级的前一个数组的内容,比如: 输入键名“523” 后返回 键名“511” 的内容。