开发者

help with a php array

I have array that looks like this,

    Array
(
    [email_address] => Array
        (
            [0] => sadasdasd
            [1] => Simosdsad
        )

    [firstname] => Array
        (
            [0] => sadsadas
            [1] => simon
        )

    [surname] => Array
        (
            [0] => asdasdasdasdasd
            [1] => ainley
        )

    [companies_company_id] => 
    [save_user]开发者_运维百科 => Save User
)

all the keys [0] are related is there away to make these there own array?


A simple way to do this would be something like this:

$newArray = array();
foreach($array as $key => $value)  {
    $newArray[] = $value[0];
}

Is there a reason you haven't?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜