CodeIgniter Forums
how can I load two smileys table in one function...?[solved] - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21)
+--- Thread: how can I load two smileys table in one function...?[solved] (/showthread.php?tid=37824)



how can I load two smileys table in one function...?[solved] - El Forum - 01-21-2011

[eluser]reka[/eluser]
when I load the Library Smiles in a one function, on the views option, the second smileys come into the first smiley
here my function...
Code:
function news($key = NULL){




        $image_array = get_clickable_smileys(base_url().'includes/images/emoticons', 'comment');
        
        $col_array = $this->table->make_columns($image_array, 4);
        
        $data['smiley_table'] = $this->table->generate($col_array);




        $image_array2 = get_clickable_smileys(base_url().'includes/images/emoticons', 'pesan');
        
        $col_array2 = $this->table->make_columns($image_array2, 4);
        
        $data['smiley_table2'] = $this->table->generate($col_array2);
        


    $this->load->view('public_home', $data);
    

    }



how can I load two smileys table in one function...?[solved] - El Forum - 01-21-2011

[eluser]InsiteFX[/eluser]
You need to clear the table data before creating the second column!

Code:
$this->table->clear()

InsiteFX


how can I load two smileys table in one function...?[solved] - El Forum - 01-21-2011

[eluser]reka[/eluser]
great..!
work like a charm...
I just noticed, it said in user guide...
Next time I would have more carefully read the user guide ...