Friday, April 20, 2012

PHP: Convert array to Multidimensional array

Could really do with some help.



So I have an array like so



Array
(
[0] => KK777ET#ABU|HX528E
[1] => KK777ET#ABU|UE342E
[2] => LG671ET#ABU|QK639AA
[3] => LG671ET#ABU|XX046AA
[4] => LG671ET#ABU|LX729AA
)


I need it converted to



Array
(
[0] => Array
(
[KK777ET#ABU] => HX528E
[KK777ET#ABU] => UE342E
)

[1] => Array
(
[LG671ET#ABU] => QK639AA
[LG671ET#ABU] => XX046AA
[LG671ET#ABU] => LX729AA
)

)


Any help is appreciated.



Many thanks in advance.





No comments:

Post a Comment