Hi all
Below is some code that I need help with. It is not vB related but is for a photo site. The code displays a members photos on a table with only one column. Each photo is displayed in it's own row in that one column so each photo appears below the previous like this:
photo
photo
photo
photo
This makes the page rather long if someone has alot of photos.
I would like to change this code so that there are two columns so that it would look like this
photo photo
photo photo
photo photo
below is the code, it's not that hard to figure out, I just have no clue to do what I want above.
Thanks for any help!
Below is some code that I need help with. It is not vB related but is for a photo site. The code displays a members photos on a table with only one column. Each photo is displayed in it's own row in that one column so each photo appears below the previous like this:
photo
photo
photo
photo
This makes the page rather long if someone has alot of photos.
I would like to change this code so that there are two columns so that it would look like this
photo photo
photo photo
photo photo
below is the code, it's not that hard to figure out, I just have no clue to do what I want above.
PHP Code:
$imgdir=strtolower("photo/$profil[nick]");
if(is_dir($imgdir)) $timgs=ReadThumbImages($profil["nick"]);
if(is_array($timgs)) {
$viewImgs = "<table border='0' cellpadding='0' cellspacing='0' bgcolor='#CCCCCC'>
<tr>
<td>
<table width='100%' border='0' cellspacing='1' cellpadding='4'>";
foreach($timgs as $timg) {
$imgNrs++;
$viewImgs .= "<tr bgcolor='#FFFFFF'>"; $i++;
$viewImgs .= "<td align='center'><a href=\"JavaScript: gow('$imgdir/b_".substr($timg,2,strlen($timg))."')\"><img src='$imgdir/$timg' alt='$timg' border=0></a></td>";
$viewImgs .= "</tr>"; //$i=0;}
}
$viewImgs .= "</table>
</td>
</tr>
</table>";
}
}
Thanks for any help!
Comment