php getcsv into multidimensional array / turn data from database table into multi-level frop down menu

My CSV file looks something like this:

enter image description here

And I want to then it in to a multidimensional array like this:

$menu_list_array = array(
'App 01' => array('Function1' => array('lvl2menu' => 'Sub Function1','Sub Function2','Sub Function3'),
'Function2' => array('lvl2menu' => 'Sub Function4','Sub Function5','Sub Function6')),
'App 02'  => array('Function3' => array('lvl2menu' => 'Sub Function7','Sub Function8','Sub Function9'),
'Function4' => array('lvl2menu' => 'Sub Function10','Sub Function11','Sub Function12'),
'Function5' => array('lvl2menu' => 'Sub Function10','Sub Function11','Sub Function12')));

From what I read from the other answers, they are mostly taking the title as a key and the content as values, but I want to use the first column (e.g. App 01) as the first level array key and the second column content as the second level array key (e.g. Function 01), I'm sure there must be a way?

What I want to get at the end is to use this as a menu source, e.g.: enter image description here

And this menu should be editable from the front-end, meaning the admin should be able to add, edit and delete them on the button management page.

The menu data will be store in a database, but for testing I'm just using csv file.

Please share if there are other sample ways to achieve what I'm looking for? Thanks!