Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Arranging Images

Status
Not open for further replies.

alsaffar

Programmer
Joined
Oct 25, 2001
Messages
165
Location
KW
Hi everybody,

My target is to display images in a page that have a table with 3 rows, each row have 3 colums where each image will be in a cell.

Then a prev and next links at the bottom of the table (this part I can manage it).

The images' URL is returned from a DB's mySQL query.

How can I achieve my goal?

Please your help is apreciated ;)
 
so 9 images per page correct?

simple just a couple of loops
assume db supplies image names

while ($rows=mysql_fetch_array($result)){
$img=$rows['image_name'];
//other data as required


//col loop
for ($x=1;$x<4;$x++){

echo &quot;<tr>&quot;;

//rows loop
for ($y=1;$y,4;$y++){

echo &quot;<td><img src=\&quot;$img\&quot;></td>&quot;;

}//close rows loop

echo &quot;</tr>&quot;;

} //close columns loop

//code for pagination (previous / next)

hth

Bastien

cat, the other other white meat
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top