在PHP中附加子数组的正确方法

I'm looking for a right way of appending a child array in PHP. If I had an array like this:

$arr = [
  'id' => 2,
  'anotherArr' => [
      'id' => 2.1
   ]
];

So far I've this:

$arr['anotherArr'][] = "'Name' => 'Sam'";

perhaps it's not legit. Could you tell a right way? Thanks

You had it almost right.

$arr['anotherArr']['Name'] = 'Sam';