<?php if (!empty($rows)): ?>
    <div class="similar-forum-topics">
        <h2>Читайте также на форуме</h2>
        <?php if (!$is_mobile): ?>
        <table border="0" cellspacing="0" cellpadding="0">
            <?php foreach ($rows as $n => $row): ?>
            <?php if ($n%2 == 0): ?>
            <tr>
            <?php endif; ?>
                <td align="left" valign="top">
                    <div class="similar-forum-topics-row">
                        <a href="<?php echo htmlspecialchars($row['link']) ?>"><?php echo $row['title'] ?></a>
                    </div>
                </td>
            <?php if ($n%2 != 0 || !isset($rows[$n+1])): ?>
            </tr>
            <?php endif; ?>
            <?php endforeach; ?>
        </table>
        <?php else: ?>
            <?php foreach ($rows as $n => $row): ?>
            <div class="similar-forum-topics-row">
                <a href="<?php echo htmlspecialchars($row['link']) ?>"><?php echo $row['title'] ?></a>
            </div>
            <?php endforeach; ?>
        <?php endif; ?>
    </div>
<?php endif; ?>