WordPress.org

Ready to get started?Download WordPress

Forums

table displays rows who advance at the beginning (1 post)

  1. robertodimarco
    Member
    Posted 1 year ago #

    Hello! Sorry for my english.
    I have this table:

    <table >
    		<?php $count = 0; ?>
    		<tr>
    		<?php foreach (wp_get_post_terms($post->ID,'maniglie') as $cat) : ?>
    
    	        <td >
    	            <img class="bbb" class="boximg" src="<?php bloginfo('stylesheet_directory'); ?>/timthumb.php?src=<?php echo z_taxonomy_image_url($cat->term_id); ?>&h=55&w=55&zc=1"/>
    	                <p style="color:black;"><?php echo $cat->name; ?></p>
    	        </td>
    	        <?php if(++$counter % 4 == 0) : ?> <!-- number of columns -->
    	    </tr> <!-- colonna -->
    	    <?php endif; ?>
    	    <?php endforeach; ?>
    	</table>

    If i have 10 elements, i suppose something like this:

    1 - 2 - 3 - 4
    5 - 6 - 7 - 8
    9 -10

    My table is doing that :

    1 - 2
    3 - 4 - 5 - 6
    7 - 8 - 9 - 10

    where's the problem?
    Thanks!

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags