Results 1 to 3 of 3

Thread: Need help sending to tables

  1. #1
    Join Date
    Jan 2003

    Question Need help sending to tables

    I am new to this and wondered if anyone could help...

    I have a photo site that has a list of thumbnails... at the moment they are listed via php in one column in a table, but I want them to go into 4 columns...

    What I want to say is:

    if the array position is a multiple of 4 then create a new row

    else put in the same row

    know what I mean???

    If you want, have a look at


    for an example...


  2. #2
    Join Date
    Nov 2002
    NY, USA
    I'm not as fluent in PHP as I am in Perl so what you're going to be getting is psuedo code.

    write "<table><tr>"
    foreach img (0 to [last image index])
    &nbsp; &nbsp; if img mod 4 equals 0 then write "</tr><tr>"
    &nbsp; &nbsp; write "<td><img src='images/" img ".jpg' alt=''></td>"
    write "</tr></table>"

  3. #3
    Join Date
    Jan 2003
    Yes, I see - very clever. Thanks. I'll go away and try to php it

    If there was anyone who could translate the pseudo script faster than I will be able to, feel free to post it here...

    Cheers again...

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center