[eluser]ceej[/eluser]
Hi there,
I've just followed the first video tutorial down to a T and the ol comes out blank. all it displays is:
My Blog Heading
1.
2.
3.
As you can see the li is blank, he is the code i have in the blog.php and the blog_view.php
blog.php
Code:
<?php
class Blog extends Controller {
function index()
{
$data['title'] = "My Blog Title";
$data['heading'] = "My Blog Heading";
$data['todo'] = array('clean house', 'eat lunch', 'call mum');
$this->load->view('blog_view', $data);
}
}
?>
blog_view.php
Code:
<html>
<head>
<title><?php echo $title; ?></title>
</head>
<body>
<h1 id="my_first_heading"><?php echo $heading; ?></h1>
<ol>
<?php foreach($todo as $item): ?>
<li><?php $item ?></li>
<?php endforeach; ?>
</ol>
</body>
</html>
Any ideas on what's going wronge?