CodeIgniter Forums
Passing multiple arrays to view - 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: Passing multiple arrays to view (/showthread.php?tid=27802)



Passing multiple arrays to view - El Forum - 02-21-2010

[eluser]Funky Fresh[/eluser]
Hey Ya'll

I was wondering how i would pass the following title through to the view if $message is already being sent thorugh.

Code:
function _show_message($message)
    {
        $data['title'] = 'Signup - ';
        $this->load->view('signup/success', array('message' => $message));
    }



Passing multiple arrays to view - El Forum - 02-21-2010

[eluser]cahva[/eluser]
Put the title also to the array.. or better define the array before the load->view:
Code:
function _show_message($message)
{
    $data = array(
        'title' => 'Signup - ',
        'message' => $message
    );
    
    $this->load->view('signup/success', $data);
}