What are some best practices for structuring PHP menu arrays?

When structuring PHP menu arrays, it is important to organize the data in a way that is easy to manage and iterate through. One common best practice is to use a multi-dimensional array where each menu item is represented as a sub-array containing key-value pairs for attributes such as label, link, and any additional information. This allows for a clear and structured representation of the menu items.

$menu = array(
    array(
        'label' => 'Home',
        'link' => '/',
    ),
    array(
        'label' => 'About',
        'link' => '/about',
    ),
    array(
        'label' => 'Services',
        'link' => '/services',
    ),
    array(
        'label' => 'Contact',
        'link' => '/contact',
    ),
);