Hey everyone,
I am trying to put together a site which lists game information (in addition to other information, but focusing on this area for now) like the name of the game, the price, release date, developer, etc...
Please check it out before going on so you know what I am talking about:
http://www.cylence.org/index.php
If you look in the "game reviews" section (click on the bar), you will see database driven information "stacked" on top of each other. This is because of a lack of knowledge on my part. What I want as a result ultimatly is to have five or so games going across and then another five below that and so on...
As of right now, as you can see, I don't have this effect. My logic states that I could do one of two things:
1) I could make one large table and place five <td> tags going across and then a </tr> tag at the end of the fifth column for each row... GREAT!! Problem solved... for static pages, yes. I have no clue as to how this can be done using php. I'm assuming a counter is in order. Or...
2) This one is more of an HTML puzzle: I could find a way to place tables side by side instead of (the way it is now) going under each other by default. If this even exists. I am sooo lost!!
Any ideas? I feel that option 1 is the most logical (and correct to the use of PHP), but do not know how this would be done.
Tell me what you think of this pseudo-code of my first example:
var counter = 0
result() {
if (counter =< 5) {
counter + 1
echo "<td>";
echo "data";
echo "</td>;
} else {
counter = 0
echo "</tr><tr><td>";
echo "db information";
echo "</td>";
}
Is that sound enough? That's all I can think of to do... please help!! And even if it is sound, I don't know how to implement it!! Arg, fellow coders, I suck at this and sincerely want to be better.
Thanks
../slant