I have a multidimensional associative array that is made of of animals:
$animals = ["Cat"=>["name"=>"Junior","age"=>16],"Dog"=>["name"=>"Puppy","age"=>"Deceased"]];
I want to add a new animal to it. I know I can do this:
$animals["Lizard"]["name"]="Allen";
$animals["Lizard"]["age"]="Deceased";
But is there a way to do in in one statement, such as
$animals["Lizard"](["name"]="Eric",["age"]=>"Deceased");
Sorry I know this is a really dumb question but I'm a beginner. Thanks.