Welcome Guest, Not a member yet? Register   Sign In
bad design to put html in controller?
#5

[eluser]ojcarga[/eluser]
Following the xerobytez's suggestion why don't you just create a view (table_ajax.php) and from the controller you do something like this:

Code:
//data will have al the info to create the table in the view file
$data = array();
//With the third parameter (true) it returns a string with the content of the view file
$string_table = $this->load->view("table_ajax", $data, true);
return $string_table;


Messages In This Thread
bad design to put html in controller? - by El Forum - 09-19-2012, 12:49 PM
bad design to put html in controller? - by El Forum - 09-19-2012, 02:45 PM
bad design to put html in controller? - by El Forum - 09-19-2012, 03:48 PM
bad design to put html in controller? - by El Forum - 09-20-2012, 05:19 AM
bad design to put html in controller? - by El Forum - 09-20-2012, 10:37 AM



Theme © iAndrew 2016 - Forum software by © MyBB