Hi
I have an array of format
Array
(
[1] => Array
(
[1] => Array
(
[27] => C1
[28] => Y1
)
[2] => Array
(
[31] => C2
[32] => Y2
)
[3] => Array
(
[34] => C3
[35] => Y3
)
)
[2] => Array
(
[4] => Array
(
[37] => X1
)
[5] => Array
(
[38] => X2
)
)
[3] => Array
(
[7] => Array
(
[40] => D1
)
[9] => Array
(
[42] => D2
)
)
)
with this array I need to form another array like
Array
(
[0] => Array
(
[27] => C1
[28] => Y1
[37] => X1
[40] => D1
)
[1] => Array
(
[27] => C1
[28] => Y1
[37] => X1
[40] => D2
)
[2] => Array
(
[27] => C1
[28] => Y1
[37] => X2
[40] => D1
)
[3] => Array
(
[27] => C1
[28] => Y1
[37] => X2
[40] => D2
)
[4] => Array
(
[31] => C2
[32] => Y2
[37] => X1
[40] => D1
)
[5] => Array
(
[31] => C2
[32] => Y2
[37] => X1
[40] => D2
)
[6] => Array
(
[31] => C2
[32] => Y2
[37] => X2
[40] => D1
)
[7] => Array
(
[31] => C2
[32] => Y2
[37] => X2
[40] => D2
)
[8] => Array
(
[34] => C3
[35] => Y3
[37] => X1
[40] => D1
)
[9] => Array
(
[34] => C3
[35] => Y3
[37] => X1
[40] => D2
)
[10] => Array
(
[34] => C3
[35] => Y3
[37] => X2
[40] => D1
)
[11] => Array
(
[34] => C3
[35] => Y3
[37] => X2
[40] => D2
)
)
and it should work for 'n' dimensional array not only for 3-dimensional array.
Please help me with this.....
Thanks in advance.