Welcome Guest, Not a member yet? Register   Sign In
[SOLVED]Endforeach error and data viewing not appearing
#1

[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


Messages In This Thread
[SOLVED]Endforeach error and data viewing not appearing - by El Forum - 09-02-2010, 09:42 AM
[SOLVED]Endforeach error and data viewing not appearing - by El Forum - 09-02-2010, 09:45 AM
[SOLVED]Endforeach error and data viewing not appearing - by El Forum - 09-02-2010, 09:50 AM
[SOLVED]Endforeach error and data viewing not appearing - by El Forum - 09-02-2010, 09:52 AM
[SOLVED]Endforeach error and data viewing not appearing - by El Forum - 09-02-2010, 09:54 AM
[SOLVED]Endforeach error and data viewing not appearing - by El Forum - 09-02-2010, 09:55 AM



Theme © iAndrew 2016 - Forum software by © MyBB