0
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 include one more array in the last array in my array list.
Getting like this 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'
],
]
]
];
There is a function to facilitate the work?