Код выводит "оппонент 1" и "оппонент 2"
<td><a href="/?content=person&id=<?php echo $theme['user_id']; ?>"><?php echo $theme['login']; ?></a></td>
<td>
<?php if (isset($theme['opponent_id'])) : ?>
<?php
$opponent = selector($mysqli, '*', 'users', 'WHERE id = ' . $theme['opponent_id']);
if ($opponent) :
$opponent = $opponent[0];
?>
<a href="/?content=person&id=<?php echo $opponent['id']; ?>"><?php echo $opponent['login']; ?></a>
</td>