Hi everyone, I am new to the google groups and newsgroups altogether.
I have been coding PHP for about 6 months now and I am starting to tackle more complex programming, and having never gone through a scructured course on PHP, I am posting my question here :-) so here goes.
I am trying to write a script that will allow me to connect to a mySQL backend and display pictures in a table--- example of how i want display to look shown below.
| PIC 1 | Pic 2 | Pic 3 |
| PIC 4 | Pic 5 | Pic 6 |
| PIC 7 | Pic 8 | Pic 9 |
ETC.
here is the code i have so far
<?php do { ?>
<?php
$i = 1;
$row_size = 4;
for($i = 0; $i <=3; $i++);
{
print("<td><img src= ". $row_photos['PicLocationSmall'] . "></td>");
if(($i % $row_size) == 0)
print("</tr><tr>");
}
$i++;
?>
<?php } while ($row_photos = mysql_fetch_assoc($photos)); ?>
With this code here, i get the following out put
| PIC 1 |
| PIC 2 |
| PIC 3 |
| PIC 4 |
| PIC 5 |
| PIC 6 |
COULD SOMEONE PLEASE HELP ME TO KNOW WHAT I AM DOING WRONG.
or if some one has their code that does the same as i am looking for and they dont mind sharing, PLEASE HELP
thank you all so much
ADAM