Array push with associate array
问题 If I am working with an associate array like such: Array ( [Username] => user [Email] => email ) and I want to add an element to the end, I would think to do: array_push($array, array('Password' => 'pass')); However, this leaves me with: Array ( [Username] => user [Email] => email Array ( [Password] => pass ) ) How can this be avoided so I end up with: Array ( [Username] => user [Email] => email [Password] => pass ) Much appreciated! 回答1: You are using an associative array so you just set the