How can I combine two arrays it should be ordered like the example below?
I want to take this few arrays:
Array
(
[0] => Array
(
[0] => ZE
[1] => CD
[2] => 97
)
[1] => Array
(
[0] => ZE
[1] => CD
[2] => 1908923
)
[2] => Array
(
[0] => ZD
[1] => CD
[2] => 23
)
)
And I want it should be like this:
Array
(
[0] => Array
(
[ZE] => Array
(
[0] => Array
(
[0] => CD
[1] => 97
)
[1] => Array
(
[0] => CD
[1] => 1908923
)
)
)
[1] => Array
(
[0] => ZD
[1] => CD
[2] => 23
)
)
I tried to do some loops but I got no result, please help
Thanks