PHP Array to Load Images into Table

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
toshtrent
Forum Newbie
Posts: 2
Joined: Sat Mar 18, 2006 7:57 pm

PHP Array to Load Images into Table

Post by toshtrent »

Hi there.

I am trying to load a table 3 columns wide and endless number of rows from an array. I will be loading the filename from the database and somehow inserting it into the cell.

Example of Table
----------------------------------------------
|       x        |        x        |        x        |
----------------------------------------------
|        x        |        x        |        x        |
----------------------------------------------
|        x        |        x        |        x        |
----------------------------------------------

X is the variable holding the file name of the image. The loop will step through the array outputting each filename to a seperate cell in order. Starting with cell 1 to 2 to 3 and so on. I am stuck on which approach to take with this, and would be extremely grateful if someone could assist me.

$aryActivityList[]("strActivityName" => "Free Running", "strActivityImagePath" => "freerunning.jpg");

How can i loop through the array until all images have been outputted into the table?
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Useful Posts wrote:• Multi-column formatted output: PHP & MySQL formatting problem
• Multi-column formatted output 2: Create Member Directory with Alphabetical Listings
toshtrent
Forum Newbie
Posts: 2
Joined: Sat Mar 18, 2006 7:57 pm

Post by toshtrent »

feyd wrote:
Useful Posts wrote:• Multi-column formatted output: PHP & MySQL formatting problem
• Multi-column formatted output 2: Create Member Directory with Alphabetical Listings
Kool thank you for finding this for me, seems to be exactly what i'm looking for. I'll try and implement that now. Thanks again!
Tosh
Post Reply