| |
1. Need help creatig array of array |
|
Reply |
|
|
 Tanmoy Ghoshal | 2010-02-08 05:56:00 |
Hi, Everybody
I am getting the array from database in this structure:
Array (
[0] =>
Array (
[MAIN_CODE] => MAINTEST1
[SUB_CODE] => SUBTEST1
[MAINCODE_STATUS] => N
[SUBCODE_STATUS] => N
[CODE_TEST] => YES
)
[1] => Array (
[MAIN_CODE] => MAINTEST1
[SUB_CODE] => SUBTEST2
[MAINCODE_STATUS] => N
[SUBCODE_STATUS] => N
[CODE_TEST] => NO
)
)
but I want the create output for above array in different array structure that below I mentioned:
Array(
[MAINTEST1] =>
Array(
MAINCODE_STATUS => N
SUBTEST1 =>
Array(
SUBCODE_STATUS => N
CODE_TEST => YES
)
SUBTEST2 =>
Array(
SUBCODE_STATUS => N
CODE_TEST => NO
)
)
)
Can anybody help me how create this array using PHP.
Regards
Tanmoy |
There is 1 reply in this thread, which is not being displayed.
Browsing this forum thread replies is available only to premium subscribers.
Go to the premium subscriptions page to learn how to become a premium subscriber and have full access to this forum.