If multiple entries are stored in a single meta key, then get_post_meta()
will return an array of those values.
get_post_meta( $post_id, 'game' ); // returns ['game 1', 'game 2']
If you want to iterate through the collection, then you'll just use a for-loop in PHP:
$games = get_post_meta( $post_id, 'game' );
foreach( $games as $game ) {
$game_slug = sanitize_title( $game ); // Turns "game 1" into "game-1" for URL usage
$game_url = 'http://www.url.com/' . $game_slug;
echo '<a href="' . esc_url( $game_url ) . "'>' . esc_html( $game ) . '</a>';
}
I've added escaping above for both the URL and the title so the rendered markup will be as safe as possible - we don't want anyone embedding a script tag as a game title and hijacking the site ;-)
explode
function to get each meta value.