[eluser]Redwhirl[/eluser]
I have a problem with my controller, here is the code
function index()
{
$this->load->model('welcome_model');
$data['rows'] = $this->welcome_model->getAll();
$this->load->view('welcome_message',$data);
}
Nothing appears in my view, but if I make a print_r($data), the data appears.
Now in my view I have another problem, I have this code
<?php foreach($rows as $r) : ?>
<?php echo $r->prod_name; ?>
<?php echo $r->nb_tickets_sold; ?>
<? php endforeach; ?>
and when I run it, I get this error :
Parse error: syntax error, unexpected $end in C:\WampServer\www\CodeIgniter\Project_R\application\views\welcome_message.php on line 58
I have checked the syntax seems to be right.
A helping hand would be appreciated
Thanks