Welcome Guest, Not a member yet? Register   Sign In
Mysql query result in html table in MY way
#6

[eluser]andrewtheandroid[/eluser]
Hi damien

whether you are using CI or your own implementation at the end of the day you will have your results in an associative array so you got that that stage.

First of all do you HAVE to use a table? If not you can use div.

Code:
<div class="oneResult"> Info for one record. label info. etc etc </div>

Then to format them in rows of three you can use CSS to achieve the positioning (eg. using float and clear attributes). Or you can use <span> and insert a break <br/>

If you need, inside your loop you can determine if its the third (or first depending on which u prefer) then for this element just modify the class or style.

Code:
if ( $counter % 3 == 0 ): // then insert style="..." or class=" .. "  inside the tag


Messages In This Thread
Mysql query result in html table in MY way - by El Forum - 11-03-2009, 08:16 AM
Mysql query result in html table in MY way - by El Forum - 11-03-2009, 08:44 AM
Mysql query result in html table in MY way - by El Forum - 11-03-2009, 09:17 AM
Mysql query result in html table in MY way - by El Forum - 11-03-2009, 09:21 AM
Mysql query result in html table in MY way - by El Forum - 11-03-2009, 09:55 AM
Mysql query result in html table in MY way - by El Forum - 11-03-2009, 03:14 PM



Theme © iAndrew 2016 - Forum software by © MyBB