PHP добавить в ассоциативный массив
// for php 5.4+
$data += [$key => $value];
// for php 5.4-
$data += array($key => $value);
Wrong Warbler
// for php 5.4+
$data += [$key => $value];
// for php 5.4-
$data += array($key => $value);
$a1=['aa'=>'123' , 'bb'=>'454'];
$a1 = array_merge( $a1 , ['a'=>1,'b'=>2] ) ;
$a = array('foo' => 'bar'); // when you create
$a['Title'] = 'blah'; // later
$data[$category][] = $item;
$arr = array(
"name" => "jonh",
"Mob" => "588555",
"Email" => "jonh143@gmail.com"
);
$arr['Country'] = "United State";