View Single Post
Old 12-05-2012, 01:57 PM   PM User | #1
joecanty12345
New to the CF scene

 
Join Date: Jan 2008
Posts: 4
Thanks: 2
Thanked 0 Times in 0 Posts
joecanty12345 is an unknown quantity at this point
Generate HTML Table from MYSQL query

I have the following code that pulls addresses from mysql. Not that some have one address and others may have nine addresses. Right now it lists the addresses in <ul><li>:



How can I make it display the results in a 3 column table like:




Here is the code I currently have:

Code:
<h2><a name="locations"  style="color:#fff">Office Locations</a></h2>
<?php $total=get_post_meta($post->ID,'total_addresses',true);?>
<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>

Please forgive me if I have not provided enough information. I am imagining that is the only area that needs edited
joecanty12345 is offline   Reply With Quote