View Single Post
Old 12-06-2012, 10:29 AM   PM User | #2
abduraooft
Supreme Master coder!

 
abduraooft's Avatar
 
Join Date: Mar 2007
Location: N/A
Posts: 14,689
Thanks: 158
Thanked 2,184 Times in 2,171 Posts
abduraooft is just really niceabduraooft is just really niceabduraooft is just really niceabduraooft is just really niceabduraooft is just really nice
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>";
         
?>
__________________
Quote:
The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)
abduraooft is offline   Reply With Quote
Users who have thanked abduraooft for this post:
joecanty12345 (12-06-2012)