Page 1 of 1

how do I dispaly results like this

Posted: Mon Oct 01, 2007 9:41 pm
by achintha
I want to know if we want to dispaly results like this how i do it.

Sample:
Results
1
2
3
4
5
6

this is normal way. I wna to know how I do dispaly like following way

1 2
3 4
5 6

please help me

Posted: Mon Oct 01, 2007 11:01 pm
by s.dot
I suppose you mean getting the results in a formatted table? There's a lot of info on these boards about this in the "useful posts" topic or if you search the boards.

Otherwise if you just want two results per line.. just use a loop like the following.

Code: Select all

$i = 0;
while ($whatever)
{
    if ($i == 2)
    {
        echo '<br />' . "\n";
        $i = 0;
    }

    echo $result;
    $i++;
}