|
Posted by shimmyshack on 04/26/07 12:16
On Apr 26, 6:28 am, _Skare_Krow_ <petra2...@gmail.com> wrote:
> I have a database with three columns. One is an atomic number, one is a
> pic url, and the other is a description. What I'm having trouble doing
> is putting the url in one table row and the description in another table
> row right below it like this...
> <tr> <td> some pic url</td> <td> other pic url</td></tr>
> <tr><td> some descripts </td> <td> other descript </td></tr>
>
> whilest limiting the rows to about 10 cells each,,....
>
> any ideas?
>
> Aaron
once you have your results in a 2d array, use 2 loops, one to create
the cells, which steps through the array echoing pics iterating by
one, the outer loop iterates by however many cells you used, if 10
then $i+=10, you could use array_shift with less complexity but it
might be slower.
you could use fluid (floating) css with a simple array and just set
the number of columns using css instead.
Navigation:
[Reply to this message]
|