Urgent!! How Can I Display records like this??


How can i display two different records in one row?


|data 1 | data2 |

|data 3 | data4 |



Not exactly sure what you are have trouble with? The formatting of it or the way to go about it. Please give us more information and will be better able to help you.


I want to display records by a table. A table with two columns.
In general, records are shown vertically.
How can I show records horizontally?


|data 1 | data2 |

|data 3 | data4 |


example : http://www10.brinkster.com/babytear/question.htm




query the database
get the number of results
start a row
loop to show results (for loop)
    display record
    if the for loop is even (look at mod)
        end the table row
        start a row
    end if
end loop

Make sense?


That’s a nice answer lig ;)


but lig, how does one check if a number is even? :D

I remember back when I used to play around with c++ that I would divide the number by 2 and check for a remainder, but I can’t remember now how I did that…


It’s the modulus function

if (($Value % 2) == 0) {
//Value is even
} else {
//Value is odd


cool 8)