How to add a new item to two dimensional array?

I have this array:
$kitchen = array( 
 "foods" => array (
 "name" => "hot dog",
 "price" => "$5"
)
 );


as you can see I have foods, let's say I want to add drinks (he must have name and price) using any miracle functions (such as array_push), whatever, but I need to be able to add further new elements (arrays). The question is how.

For example:
echo $kitchen["foods"]["name"]; // output: hot dog;
echo $kitchen["drinks"]["name"]; // output: coca cola;


Please help.
June 10th 19 at 15:04
2 answers
June 10th 19 at 15:06
Solution
$kitchen['drinks'] = array (
 "name" => "co co co",
 "price" => "$100500"
 );
is it possible to run it using push? - Zola_Wilkinson commented on June 10th 19 at 15:09
impossible. it is possible through merge. - kavon.Murphy commented on June 10th 19 at 15:12
June 10th 19 at 15:08

Find more questions by tags ArraysPHP