I have a form on my website where users can submit their own posts and one of the fields has a dropdown containing various countries so a user can enter their location. I would like this location to be displayed when the post is published so I have written the below code to achieve this:
<?php echo stripslashes(get_user_meta($uid, 'user_location', true)); ?>
However, this only displays the category "ID" number (not the category "name" of the location). What can I write so the NAME of the location is displayed?