Page 1 of 1

displaying array data in multiple columns

Posted: Wed Jul 12, 2006 2:27 pm
by dylan001
I have a column in a MySQL database

company 1
company 2
company 3
company 4
company 5
...

how can I call it from the database into three colums using php:

i.e.

company 1 company 2 company 3
company 4 company 5 ...

I have been used to using the while() to call up data from different columns but this doesnt work in this instance? Any ideas on a possible solution would be greatly appreciated.

PS sorry if this has been covered before - couldn't find what I was looking for in the search.

Posted: Wed Jul 12, 2006 2:28 pm
by Oren
viewtopic.php?t=51506

Edit: Yes, I agree... The search sucks.

Posted: Wed Jul 12, 2006 2:42 pm
by dylan001
The thread helped a little although I have the same problem as the final post... I'm getting a blank page. I appear to be getting all of the line breaks but none of the data from the database?

Any suggestion would be great.

Posted: Wed Jul 12, 2006 2:58 pm
by RobertGonzalez
If this is the case, make sure your field names are right. Echoing data that PHP doesn't recognize usually results in empty echos (when display_error is off, anyway).