Support » Fixing WordPress » table displays rows who advance at the beginning

  • 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!

  • The topic ‘table displays rows who advance at the beginning’ is closed to new replies.