Converting arrays into another format (PHP)
Posted
by apis17
on Stack Overflow
See other posts from Stack Overflow
or by apis17
Published on 2010-03-11T09:11:34Z
Indexed on
2010/03/12
8:17 UTC
Read the original article
Hit count: 195
Hi.. i want to convert this array
Array
(
[2] => Array
(
)
[4] => Array
(
[12] => Array
(
)
[13] => Array
(
[16] => Array
(
)
)
)
[5] => Array
(
)
[10] => Array
(
)
[14] => Array
(
)
)
into this format
Array
(
[2] => 2
[4] => Array
(
[0] => 12
[13] => Array
(
[0] => 16
)
)
[5] => 5
[10] => 10
[14] => 14
)
can anybody help? thanks.
© Stack Overflow or respective owner