How can i display two different records in one row?
Example:
|data 1 | data2 |
|data 3 | data4 |
:
How can i display two different records in one row?
:
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?
:
example : http://www10.brinkster.com/babytear/question.htm
THx VERY MUCH
logic:
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?
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
http://us2.php.net/operators.arithmetic
[php]
if (($Value % 2) == 0) {
//Value is even
} else {
//Value is odd
}
[/php]
cool