Page 1 of 1

using a txt file to produce a table

Posted: Sat Feb 26, 2005 5:41 pm
by andylyon87
If I have a list of names in a txt file:
Andy
Phil
Dave
andy
How do I go about putting these in a table. Of four columns wide. Also if more were added they would automatically go to the nex line.

E.g.

we have:
Andy
Phil
Dave
andy
from the txt file in a table and i add
Jamie
Jen
Dan
Rach
They would then go beneath, the first four in the table

Have been sat here for hours playin round with the code of a for loop but i can't get it to work.

btw. the above is just an exapmple the real thing is for a gallery with hyperlinked images....thanks

Posted: Sat Feb 26, 2005 6:00 pm
by feyd
read "Multi-column formatted output" in the Useful Posts thread (link in my signature)

Posted: Sun Feb 27, 2005 4:41 am
by andylyon87
I dont understand SQL very well and am going to be learning the basics in the next few months, however that way makes more sense.

Is there any way of reading the images straight from the file and just opening them on the page using php.

Posted: Sun Feb 27, 2005 7:54 am
by feyd
..that's how you'd display themm.. so yeah.