PDA

View Full Version : IE 6 Bug on 'a href' from loop


DuMmWiaM
03-25-2005, 11:43 AM
I am using the following loop to display 40 image-thumbs to a table in 4 rows. The problem is that it doesn't work on IE6! It work fines on Mozilla, but IE6 doesn't show the pictures. I don't want to use any DB for this job I just want this god-damn loop to work :(. I played with the code a little bit, and I found out that the problem is the "a href". Whenever I call that HTML tag in the loop (so that every thumb, leads to the appropriate normal-size image) the IE6 doesn't show anything!

Any help will be appreciated...this thing is driving me crazy!

Best Regards


<?
echo '<table>';
$x=1;
for ($i=1;$i<=40;$i++) {
if ($x==1) {
echo('<tr>');
}
echo '<td align="center">';
echo '<a href="../graphs/pics/photo'.$i.'.jpg"';
echo '<img src="../graphs/pics/photo';
echo $i .'t.jpg" border="0"></a>';
echo '</td>';
if ($x==4) {
echo '</tr>';
$x=1;
}
else {
$x++;
}

}
echo '</table>';
?>

marek_mar
03-25-2005, 11:52 AM
You are missing a closing > for your a tag. :)

Fou-Lu
03-25-2005, 08:24 PM
I just thought that I'd mention as well, this may be php code, but the output is the problem. When it works on one browser and not in another its usually due to either the configurations with your clients browser, or the html code; not the php. The only thing I've come across so far is when using .htaccess files from my root directory, and stating another within a folder, sometimes fire fox asks to validate both of them, which is pretty odd. This on the other hand could have been my apache configurations as well, not an actual problem. But yeah, always check for what the actual ouput is first, chances are its a problem in there.