Once you’ve got the id of a post or page, use get_the_title($id)
to get the page title (which is what I assume you mean by name)
Once you’ve got the id of a post or page, use get_the_title($id)
to get the page title (which is what I assume you mean by name)