Dun mismo sa documentation makakakuha ka na ng clue: http://ellislab.com/codeigniter/user...ral/views.html
Pwedeng diskartehan nang ganito:
Or meron pang isang shortcut gamit ang compact()
via Symbianize Forum http://www.symbianize.com/showthread.php?t=1075993&goto=newpost
Code:
$data = array(
'title' => 'My Title',
'heading' => 'My Heading',
'message' => 'My Message'
);
$this->load->view('blogview', $data);
Pwedeng diskartehan nang ganito:
Code:
$title = 'My Title';
$heading = 'Heading ko';
$message = 'message here';
$data = array(
'title' => $title,
'heading' => $heading,
'message' => $message,
);
$this->load->view('blogview', $data);
Or meron pang isang shortcut gamit ang compact()
Code:
$title = 'My Title';
$heading = 'Heading ko';
$message = 'message here';
$var1 = 3;
$var2 = 4;
$this->load->view('blogview', compact('title', 'heading', 'message', 'var1', 'var2'));
via Symbianize Forum http://www.symbianize.com/showthread.php?t=1075993&goto=newpost
Aucun commentaire:
Enregistrer un commentaire