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