Hi,
I think you could add the following portion of code inside your request in
order to get two result arrays : odd[] and even[]
----------------------------------
$j = 0 ; $k = 0 ;
for ($i=0;$i<rows;$i++)
{
$tmp = $i % 2 ;
switch ($tmp)
{
case "0":
even[$j] = row[$i]
break;
case "1":
odd[$j] = row[$i]
break;
}
}
----------------------------------
note : the "%" operator enables you to get the "rest" of a division operation.
in your case, "$i % 2" enables you to determine whether "$i" is odd or even.
regards,
samuel
Quoting "Rubanowicz, Lisa" <[EMAIL PROTECTED]>:
> HI all,
> I am just a beginner at this stuff but I can't get my head around the
> logic
> of getting Row 1 in the left hand side of a two column table and Row 2
> data
> in the right hand side.
> Something like this
> _______________________________________________________
> | Data from Row 1 in MySQL | Data from Row 2 in MySQL |
> |__________________________|____________________________|
> | Data from Row 3 in MySQL | Data from Row 4 in MySQL |
> _______________________________________________________
>
> Can someone please send me some help. I know I have to do something
> with
> 0,2,4,6,8 and 1,3,5,7,9 but how to lay it out within the HTML is just
> a
> puzzle.
> I am sure it has been done before. Basically I want to use it on a
> Table of
> Contents page
>
> Thanks for any help
> All the Best
> Lisa
>
> Lisa Rubanowicz
> Case ITC,
> Navan, Ireland
> Tel: #353 (0)46 77663
>
> [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
>
>
>
--
Samuel Torton
[EMAIL PROTECTED]
NCSLab.com
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]