Forum Moderators: coopster

Message Too Old, No Replies

Tables or Divs to display output?

         

CWebguy

7:22 pm on Oct 18, 2007 (gmt 0)

10+ Year Member



I was wondering, is it still acceptable to output data from PHP/Mysql in tables, or are tables completly deprecated?

I can see using DIVs and CSS for creating layouts, which I do, but for outputing data in a neat fashion it seems it would be much more complex and wasteful in PHP/Mysql using DIVs rather than just plain old fashioned tables. I know I could do it in DIVs if needed, but is it still ok to use tables or should we "upgrade" everything to DIVs?

[edited by: CWebguy at 7:25 pm (utc) on Oct. 18, 2007]

jatar_k

9:17 pm on Oct 18, 2007 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



you're ging to walk yourself into a holy war on that one, there tons of threads around about it

I use both but it is up to you.

PHP_Chimp

9:37 pm on Oct 18, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



If you are already using CSS and DIV's then why would you treat data from your database any differently?

I think that the largest issue is the accessibility one. Im sure that the question has been asked and answered many times over on that forum.

barns101

12:11 pm on Oct 19, 2007 (gmt 0)

10+ Year Member



It's perfectly acceptable to use tables to output tabular data from MySQL. That's what tables are for. ;)

henry0

12:22 pm on Oct 19, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



The tougher to achieve by using CSS in a PHP/MySQL environment Is to control dynamism if you only deal with a fixed size image and fixed size of content then you is off the hook.
But if you allow for real dynamism and for example user input
Then you need to be really, really sharp and creative with CSS
In a split sec the page flow will be broken, elements thrown all over the place
Text and image spilling on each other, another word you have created havoc :)

We do it, but that’s why we hire a CSS wizard for the CSS style and layout.

<edit>
Typo
</edit>

CWebguy

4:34 pm on Oct 19, 2007 (gmt 0)

10+ Year Member



It's perfectly acceptable to use tables to output tabular data from MySQL. That's what tables are for. ;)

Perfecto!

When I think about it, databases are in tables. They are organized into columns and rows and it would those be perfect to display them using tables (which match the same structure) rather than divs which don't.

[edited by: CWebguy at 4:40 pm (utc) on Oct. 19, 2007]

dreamcatcher

5:22 pm on Oct 20, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



It's perfectly acceptable to use tables to output tabular data from MySQL. That's what tables are for.

ditto.

dc

henry0

5:52 pm on Oct 20, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member




but for outputing data in a neat fashion

Aren’t you extrapolating when assuming that CWebguy
Precisely refer to tabular data :)