Transform a horizontal table row into a vertical one

后端 未结 3 463
无人共我
无人共我 2021-01-21 06:20

I am using CodeIgniter 2.1.0 and MySQL. I want to display a horizontal data row as a vertical one. When I fetch a single row from the database and echo it, it looks like

3条回答
  •  失恋的感觉
    2021-01-21 06:49

    This problem has a very easy solution by using a single foreach loop in your view page:

    /* for controller */    
        $data['user_data'] = $this->modle_name->function_name;
        modle_name= your modle name where the specific function exists.
        function_name= function into the modle by which you get all the table value from mysql db.
    

    then write the function currectly in modle and go to the view page:

    /* for view */
    
    
    
     
     
     
     
     
     
     
     
     
    
    

提交回复
热议问题