[thelist] another PHP Sql question...

M.G. Noriega manuel at simplelogica.net
Fri Aug 29 06:21:22 CDT 2003


El vie, 29-08-2003 a las 08:13, jsWalter escribió:
> I am querying a database just fine.
> 
> getting back what I expect, just fine.
> 
> But now I've been thrown a wrench in the form of double row display.
> 
> my client wants...
> 
>      a    b
>      c    d
>      e    f
>      ...
> 
> Well, I've reached the end on my PHP/SQL knowledge (which really isn't all
> that far!)
> 
> Right now I'm doing (very much shortened)...
> 

One way:

Use a counter and increment it in every step of the loop. If the counter
is odd put the field in array $oddfields, if it's even put it in
$evenfields. After that, build a tr with each position of both arrays

i.e.

echo "<tr><td>",$oddfields[0],"</td><td>",$evenfields[0],"</td></tr>";

etc, etc...

HTH



> 
> -- 
> * * Please support the community that supports you.  * *
> http://evolt.org/help_support_evolt/
> 
> For unsubscribe and other options, including the Tip Harvester 
> and archives of thelist go to: http://lists.evolt.org 
> Workers of the Web, evolt ! 

-- 
Manuel González Noriega
Simplelógica, construcción web @ http://simplelogica.net
Logicola es el weblog de Simplelógica http://simplelogica.net/logicola/



More information about the thelist mailing list