I'm trying to create dynamic breadcrumbs from an array. So I can add to the array and not have to manually update the breadcrumbs.
Okay, here's a snippet of my array: (It won't go much deeper)
$menu = array(
'Dashboard' => array(
'Projects' => array(
'Project 1' => array(
'Project settings' => 'projects/project_1/settings',
'Issue Tracker' => 'projects/project_1/issue_tracker',
'Customize page' => 'projects/project_1',
'Manage files' => 'projects/project_1/files',
),
'Project 2' => array(
'Project settings' => 'projects/project_2/settings',
'Issue Tracker' => 'projects/project_2/issue_tracker',
'Customize page' => 'projects/project_2',
'Manage files' => 'projects/project_2/files',
),
),
'Logout' => '#',
)
);
I would like to be able to return all the parents of any key in a way that I can iterate through later. For instance, for 'Project settings':
'Dashboard','Projects','Project 1'.