Quote:
PHP Code:
<ul style="list-style: none;">
<?php for($i=1;$i<=$total;$i++): ?>
<?php $address=get_post_meta($post->ID,"em_address_$i",true); ?>
<li><?php echo $address; ?></li>
<?php endfor;?>
</ul>
|
Instead of the above,
Try
PHP Code:
<?php
echo '<table>';
for($i=1;$i<=$total;$i++):
if(($i-1)%3=0) echo '<tr>';
$address=get_post_meta($post->ID,"em_address_$i",true);
echo "<td> $address </td>";
if(($i-1)%3=0) echo '</tr>';
endfor;
echo "</table>";
?>