[eluser]Unknown[/eluser]
hi all,
re. the video tutorial
having searched the forum extensively !, my output consists of 4 lines, literally ______________________
______________________
______________________
______________________
I have 4 records in my entries table.
It seems to be nearly working, but instead of passing the actual posts it is outputting these lines....
CONTROLLER
<?php
class blog extends Controller {
function blog()
{
parent::Controller();
$this->load->database();
}
function index()
{
$data['title'] = "My Blog Hell";
$data['heading'] = "Load of Blog";
$data['query'] = $this->db->get('entries');
$this->load->view('blog_view', $data);
}
}
?>
VIEW:
<html>
<head>
<title><?php echo $title; ?></title>
</head>
<body>
<h1><?php echo $heading; ?></h1>
<?php foreach($query->result() as $row): ?>
<h3><?php $row->title ?></h3>
<p><?php $row->body ?></p>
<hr>
<?php endforeach;?>
</body>
</html>
any pointers grafully appreciated.