我的数组看起来像这样,
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
)
所有的键[0]是否相关,是否有自己的阵列?
答案 0 :(得分:1)
这样做的简单方法是:
$newArray = array();
foreach($array as $key => $value) {
$newArray[] = $value[0];
}
你有没有理由?