[eluser]tunabelly14[/eluser]
hey guys im new in codeignter and php programming. I'am following the tutorial in this link.
"http://www.phpeveryday.com/articles/CodeIgniter-Creating-and-Sending-Parameters-Between-Controller-and-View-P150.html"
//this is the code i am using to my controller
<?php
class Hello extends Controller{
var $name;
var $color;
function Hello()
{
parent::Controller();
$this->name = 'Andi';
$this->color= 'red';
}
function you()
{
$data['name'] = $this->name;
$data['color'] = $this->color;
$this->load->view('you_view', $data);
}
}
?>
//while this is my code to my view folder
<html>
<head>
<title>hello</title>
</head>
<body>
hello!
<font color="<?=$color?>"><?=$name?></font>!
</body>
</html>
//then the output is only
hello!
(it doesn't show the word Andi)
please help me guys. Thank you in advance!