<div id="popular-news" class="popular-news">
<?php if (!empty($data)): ?>
<table border="0" cellsapcing="0" cellpadding="0" width="1000" align="center">
<tr>
<?php foreach ($data as $i => $entry): ?>
    <td width="25%" align="left" valign="top">
        <div class="popular-news-image">
            <a href="<?php echo htmlspecialchars($entry['link']) ?>">
                <img src="<?php echo $entry['image_info']['src'] ?>" border="0" width="<?php echo $entry['image_info']['width'] ?>" height="<?php echo $entry['image_info']['height'] ?>" />
            </a>
        </div>
        <div class="popular-news-title">
            <a href="<?php echo htmlspecialchars($entry['link']) ?>">
                <?php echo htmlspecialchars($entry['title']) ?>
            </a>
        </div>
    </td>
<?php endforeach; ?>
<?php if ($i < 3): ?>
<?php for ($i=$i; $i<3; $i++) echo '<td width="25%"></td>'; ?>
<?php endif; ?>
</tr>
</table>
<?php endif; ?>
</div>