将更多键和值放入现有数组中

I have an array like so:

$json = array('error'=>true);

But I'd like to perhaps add more keys and values to this at a later time. My feeble knowledge tried this:

$json .= array('something'=>'else');

Which doesn't work. I found array_push but it seems this is for just pushing in new values - not keys. How is this achieved so that with 2 separate declarations I end up with the equivalent of:

$json .= array('error'=>true,'something'=>'else');

there are many ways to accomplish this:

  1. $json['keyname'] = 'something

  2. $json[] = 'something' <- numerical incremented key

  3. array_push($json, 'value') <- same as above

  4. $json = array_merge($json, $some_other_array) <- mixes the two arrays together

Just keep in mind that arrays are not strings