display data in colums |
[eluser]Unknown[/eluser]
In html I found out how to display my database in 4 columns using a while loop : id[1] id[2] id[3] id[4] name[1] name[2] name[3] name[4] id[5] ............ name[5]........... In codeigniter I know how to use foreach($query->result() as $row) but I haven't been able to display in columns. I have tried many methods but none of them work. I've tried with <div> and tables. thank you.
[eluser]John_Betong_002[/eluser]
Here is one of many methods for you to try: http://ellislab.com/codeigniter/user-gui...table.html Before I forget, please learn how to use code tags when posting. It really helps others to understand the script and prevents some posters from getting annoyed. Oh and welcome to CI
[eluser]Unknown[/eluser]
Thank you John_Betong_002. But how can I turn "$data['query']=$this->db->get('mytable');" into a one-dimensional array so I can apply $this->table->make_columns().
[eluser]John_Betong_002[/eluser]
Try this: Code: $this->load->library('table'); I forgot to mention - Welcome to the forum... ...and to prevent some posters getting upset 1. please post in the correct forum 2. please learn how to enclose your code inside the code tags
|
Welcome Guest, Not a member yet? Register Sign In |