如何在一个JSON数组中合并两个元素?

时间:2015-01-09 05:07:58

标签: arrays json

我对这个感到困惑,请你帮忙...

我的会话数组如下:

Array
(
    [formstep1] => Array
        (
            [username] => sa
            [email] => dsadsa
            [re-enteremail] => sad
            [password] => dsad
            [re-enterpass] => sads
        )

    [formstep2] => Array
        (
            [firstName] => asd
            [lastName] => sad
            [contactNum] => 
            [address] =>   
            [postal] => 
        )

)

我想要像这样:

Array
(
    [formstep1] => Array
        (
            [username] => sa
            [email] => dsadsa
            [re-enteremail] => sad
            [password] => dsad
            [re-enterpass] => sads
            [firstName] => asd
            [lastName] => sad
            [contactNum] => 
            [address] =>   
            [postal] => 
        )

)

请帮助..我非常感谢任何帮助,thx

0 个答案:

没有答案