get the list of menu items that are valid possible parents for the given menu item using menu_parent_options()
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;