PHP에서 다차원 배열을 재정렬해야하지만 올바르게 이해할 수 없으며 앞으로 foreach, for 및 while 루프로 어려움을 겪고 있습니다.다차원 PHP 배열 문제 재 배열
Array
(
[dimension] => Array
(
[dimension.part] => Array
(
[0] => SimpleXMLElement Object
(
[0] => geheel
)
[1] => SimpleXMLElement Object
(
[0] => geheel
)
)
[dimension.type] => Array
(
[0] => SimpleXMLElement Object
(
[0] => hoogte
)
[1] => SimpleXMLElement Object
(
[0] => breedte
)
)
[dimension.value] => Array
(
[0] => SimpleXMLElement Object
(
[0] => 73
)
[1] => SimpleXMLElement Object
(
[0] => 84
)
)
[dimension.unit] => Array
(
[0] => SimpleXMLElement Object
(
[0] => cm
)
[1] => SimpleXMLElement Object
(
[0] => cm
)
)
)
[material] => Array
(
[material.part] => Array
(
[0] => SimpleXMLElement Object
(
[0] => deelmateriaal
)
[1] => SimpleXMLElement Object
(
[0] => deelmateriaal2
)
)
[material_type] => Array
(
[0] => SimpleXMLElement Object
(
[0] => typemateriaal
)
[1] => SimpleXMLElement Object
(
[0] => typemateriaal2
)
)
[material] => Array
(
[0] => SimpleXMLElement Object
(
[0] => materiaal
)
[1] => SimpleXMLElement Object
(
[0] => materiaal2
)
)
[material.notes] => Array
(
[0] => SimpleXMLElement Object
(
[0] => notemateriaal
)
[1] => SimpleXMLElement Object
(
[0] => notemateriaal2
)
)
)
)
내가 그것을 변환해야합니다 :
dimensions => Array (1 => array(dimension.part => geheel)
=> array (dimension.type => hoogte))
.....
=> Array (2 => array(dimension.part => ...)
=> array (dimension.type => ...))
....
....
material => Array (1 => ...
2 => ...
=> Array (1 =>
=>
....
사람이에 좋은 접근 방식을 가지고
이 내가 가진 무엇인가? 내가 아주 확실하지 않다
감사합니다,
요리스
아마도 투쟁의 일부를 보여줄 수 있습니까? – k102