So please anyone, help me with this code. As I am newbie, please show me to do this from the beginning.
Thanks in advance. Desperately, need some suggestion asap :(.
public function get_subcat()
$cat = $this->uri->segment(3);
$d['query'] = $this->db->get('table_to_query');
inside the view you can return plain text or json, in this example you will get json: