![]() |
Template parser class with database array - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Libraries & Helpers (https://forum.codeigniter.com/forumdisplay.php?fid=22) +--- Thread: Template parser class with database array (/showthread.php?tid=32029) |
Template parser class with database array - El Forum - 07-10-2010 [eluser]alfisahr[/eluser] Dear all, please help me. i'm confused about this problem. i have records on my table. Let say guestbook id sender 1 Alfin 2 John 3 Merry This is My template.php <html> ..... <body> {content} .... <html> If i will call all the records with database array on my variable template, i have try this : .... function index() { $query = $this->db->query('select * from guestbook'); $row = $query->row_array(); $data = array('content' => $row['sender']); $this->parser->parse('template',$data); ................ But, the output just showing the last of record. Here this Merry I want to show all records, hw about the code. please help me... rgrds Alfisahr Template parser class with database array - El Forum - 07-11-2010 [eluser]alfisahr[/eluser] any idea for that ??? tq alfisahr Template parser class with database array - El Forum - 07-11-2010 [eluser]victorche[/eluser] Try this: Code: function index() { Code: <html> Template parser class with database array - El Forum - 07-11-2010 [eluser]alfisahr[/eluser] Thank u so much victorche, its running well. I need that for showing several news in database. tq so much Template parser class with database array - El Forum - 06-14-2011 [eluser]Unknown[/eluser] hi,every one.. I m new to the codeigniter. Now i m developing the newsletter module. After parsing the data,how can i send that newsletter to the particular user? Will i may follow the normal $this->email->send(); method? Please guide me.... Thank u.... |