get the list of menu items that are valid possible parents for the given menu item using menu_parent_options() I want to get the list of parents for a given menu item. As described at api.drupal.org  https://api.drupal.org/api/drupal/modules%21menu%21menu.module/function/menu_parent_options/7
I tried but i am not able to get all the parent of a menu item. As the second argument $item to this function should be menu item i tried this code. For example

&lt;?php
$menu_name = array('management' =&gt; 'Management');
var_dump(menu_parent_options($menu_name, menu_link_load(23)));
?&gt;


I want to get the parent list of menu /admin/appearance/list which have mlid = 23.
But this code give output


  array (size=1)   'management:0' => string '' (length=12)


but output should give /admin/ and /admin/appearance also in output in the form of 


  menuname:mlid
Try this and see if it helps

&lt;?php
$menu_arr = menu_get_menus();
echo '&lt;pre&gt;';print_r((menu_parent_options($menu_arr, 23)));
?&gt;