使用关联阵列推送阵列
2022-08-30 20:24:07
如果我正在使用这样的关联数组:
Array ( [Username] => user
[Email] => email
)
我想在最后添加一个元素,我会想做:
array_push($array, array('Password' => 'pass'));
但是,这给我留下了:
Array ( [Username] => user
[Email] => email
Array ( [Password] => pass )
)
如何避免这种情况,所以我最终得到:
Array ( [Username] => user
[Email] => email
[Password] => pass
)
非常感谢!