I have an array with several arrays inside
Ex:
$menus = [
[0] => [
'menu' => [
'href' => '/product',
'menu' => 'Produtos'
]
],
[1] => [
'menu' => [
'href' => '/category',
'menu' => 'Categorias'
]
],
[2] => [
'menu' => [
'href' => '/user',
'menu' => 'Usuários'
]
]
];
How can I add another array to the last array in my array list.
Getting this way at the end
$menus = [
[0] => [
'menu' => [
'href' => '/product',
'menu' => 'Produtos'
]
],
[1] => [
'menu' => [
'href' => '/category',
'menu' => 'Categorias'
]
],
[2] => [
'menu' => [
'href' => '/user',
'menu' => 'Usuários'
],
'submenu' => [
'menu' => [
'href' => '/user/list',
'menu' => 'Todos Usuários'
],
]
]
];
Is there a function to make the job easier?