Jump to content

image with caption in diff <tr>


sitorush

Recommended Posts

Hello friends,

i wanna ask what is the best way to make catalog with caption, ex.

<tr>1 for image

<tr>2 for file name

<tr>3 for image again..

i try the code but it only works below 15 image.. above it always broken image..

this is my sample code (nb. my var col and row can be change from drop down box)

$br = $baris * 2;

for ($row=0; $row<$br; $row++) {

echo "<tr>\n";

if ($row % 2 == 0) {

for ($col=0; $col<$kolom; $col++) {

if (isset($chart [ 'tampil' ] [$row] [$col])) {

echo $string1.$chart [ 'tampil' ] [$row] [$col].$string2 ;

$caption[] = $chart [ 'tampil' ] [$row] [$col] ;

} else {

break 2;

}

}

} else {

for ($col=0; $col<$kolom; $col++) {

if (isset($chart [ 'tampil' ] [$row] [$col])) {

while (list($key, $val) = each($caption)) {

echo '<td><div align="center">'.$val.'</div></td>' ;

}

} else {

break 2;

}

}

echo "</tr>\n";

}

thank you for your help..

sitorush

Link to comment
https://forums.phpfreaks.com/topic/50099-image-with-caption-in-diff/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.