Okay, had to make some slight changes. Nothing big (added ".jpg" to the URL, changed the $img_tag = line to display html code (so it doesn't parse).
Here is what I have now:
PHP Code:
for ($a = 1; $a < $imgNum; $a++) {
if ($a < 100 && $a > 9) {
$place_holder = "0";
} else {
$place_holder = "";
}
if ($a < 10) {
$place_holder = "00";
}
$img_tag = "<img src="$baseURL$place_holder$a.jpg" width="325" height="250" />\n";
if ($a == 1) {
$page_content .= "<td>$img_tag";
}
if ($a % 3 == 0 ) {
$page_content .= "</td><td>\n$img_tag";
} else {
$page_content .= "$img_tag";
}
}
echo $page_content;
And it works.. kind of. The display is there, but image 1 (001) is there twice before it moves to image 002. Also, there is no line break after each $img_tag, nor are there any <td> or <tr> at all. Here is a copy of the output when the script is run:
HTML Code:
<img src="http://www.autobase.com/photos/00320/1057/10570164_001.jpg" width="325" height="250" /><img src="http://www.autobase.com/photos/00320/1057/10570164_001.jpg" width="325" height="250" /><img src="http://www.autobase.com/photos/00320/1057/10570164_002.jpg" width="325" height="250" /> <img src="http://www.autobase.com/photos/00320/1057/10570164_003.jpg" width="325" height="250" /><img src="http://www.autobase.com/photos/00320/1057/10570164_004.jpg" width="325" height="250" /><img src="http://www.autobase.com/photos/00320/1057/10570164_005.jpg" width="325" height="250" /> <img src="http://www.autobase.com/photos/00320/1057/10570164_006.jpg" width="325" height="250" /><img src="http://www.autobase.com/photos/00320/1057/10570164_007.jpg" width="325" height="250" /><img src="http://www.autobase.com/photos/00320/1057/10570164_008.jpg" width="325" height="250" /> <img src="http://www.autobase.com/photos/00320/1057/10570164_009.jpg" width="325" height="250" /><img src="http://www.autobase.com/photos/00320/1057/10570164_010.jpg" width="325" height="250" /><img src="http://www.autobase.com/photos/00320/1057/10570164_011.jpg" width="325" height="250" /> <img src="http://www.autobase.com/photos/00320/1057/10570164_012.jpg" width="325" height="250" /><img src="http://www.autobase.com/photos/00320/1057/10570164_013.jpg" width="325" height="250" /><img src="http://www.autobase.com/photos/00320/1057/10570164_014.jpg" width="325" height="250" /> <img src="http://www.autobase.com/photos/00320/1057/10570164_015.jpg" width="325" height="250" /><img src="http://www.autobase.com/photos/00320/1057/10570164_016.jpg" width="325" height="250" /><img src="http://www.autobase.com/photos/00320/1057/10570164_017.jpg" width="325" height="250" /> <img src="http://www.autobase.com/photos/00320/1057/10570164_018.jpg" width="325" height="250" /><img src="http://www.autobase.com/photos/00320/1057/10570164_019.jpg" width="325" height="250" /><img src="http://www.autobase.com/photos/00320/1057/10570164_020.jpg" width="325" height="250" /> <img src="http://www.autobase.com/photos/00320/1057/10570164_021.jpg" width="325" height="250" /><img src="http://www.autobase.com/photos/00320/1057/10570164_022.jpg" width="325" height="250" /><img src="http://www.autobase.com/photos/00320/1057/10570164_023.jpg" width="325" height="250" /> <img src="http://www.autobase.com/photos/00320/1057/10570164_024.jpg" width="325" height="250" /><img src="http://www.autobase.com/photos/00320/1057/10570164_025.jpg" width="325" height="250" /><img src="http://www.autobase.com/photos/00320/1057/10570164_026.jpg" width="325" height="250" /> <img src="http://www.autobase.com/photos/00320/1057/10570164_027.jpg" width="325" height="250" /><img src="http://www.autobase.com/photos/00320/1057/10570164_028.jpg" width="325" height="250" /><img src="http://www.autobase.com/photos/00320/1057/10570164_029.jpg" width="325" height="250" /> <img src="http://www.autobase.com/photos/00320/1057/10570164_030.jpg" width="325" height="250" /><img src="http://www.autobase.com/photos/00320/1057/10570164_031.jpg" width="325" height="250" /></table>
I can deal with the no line breaks. No big deal. But I need the </tr><tr> after every 3rd one. Thats a must.
Ideas?
Bookmarks