There are many functions for menus, but since Drupal is not hierarchical but is modular, that's why menu doesn't have node requirement and the opposite way around. So this snippet shows how to get node menu item (mlid) by node id (nid) in Drupal 7. The fastest way to do it is to run a simple query.
Source code viewer
->condition('ml.link_path' , 'node/' . $nid) ->condition('ml.menu_name', $menu_name) ->execute() ->fetchCol()); // Use your menu link id (mlid) wisely... }Programming Language: PHP