how to output image thumbs in rows of 3?
hi all i am trying to display image thumb with its title in rows of 3 but the following code out puts each image in one row! could you guys help me output the image thumb and its title in rows of 3 ?
Code:
// iterate the new array
for($i = 0; $i < count($foo2[1]); $i++){
?>
<a href="<?PHP echo $foo2[1][$i]; ?> "><img src="<?PHP echo $foo5[1][$i] ; ?>"></a>
<div class="title"><?PHP echo $foo3[1][$i]; echo '('. $foo4[1][$i]. ')'; ?></div>
<?
}//end of for loop
Re: how to output image thumbs in rows of 3?
Your issue is not clear to me. Please provide a visual example and also CSS if possible.
:wave:
Re: how to output image thumbs in rows of 3?
hai...I didn't understand.....can you explain more...
you only want to display image thumb in third row?
like this
PHP Code:
// iterate the new array
for($i = 0; $i < count($foo2[1]); $i++){
if($i==2){ // because number is start from 0...0,1,2...this only display image in third row.....
?>
<a href="<?PHP echo $foo2[1][$i]; ?> "><img src="<?PHP echo $foo5[1][$i] ; ?>"></a>
<div class="title"><?PHP echo $foo3[1][$i]; echo '('. $foo4[1][$i]. ')'; ?></div>
<?
}
}/