약간의 문제가 있습니다. 다음은 배열입니다.키 경로로 배열 값 가져 오기 PHP
$data = array(
'properties'=>array{
[0]=>
array {
["name"]=>"prop1",
["properties"]=>
array {
[0]=>
array(5) {
["name"]=>"sub_prop1"
}
[1]=>
array(6) {
["name"]=>"sub_prop2",
["properties"]=>
array(2) {
[0]=>
array(6) {
["name"]=>"MARK"
}
}
}
}
},
[1]=>
array {
["name"]=>"prop2"
}
}
);
배열 경로는 0/1/0입니다. 이름이 "Mark"인 배열까지 모든 키를 알고 있습니다.이 배열을 이와 동등하게 만들기 위해 재귀 함수가 필요합니다 : $ data [ 'properties'] [0] [ 'properties] [1] [properties] [0 ]. 제발 도와주세요 !!!