[eluser]Brad Morse[/eluser]
I am trying to add more to the blog tutorial.
Here is the blog view:
Code:
<?php foreach($query->result() as $row): ?>
<h2><?=$row->title?></h2>
<?php
$body_text = $row->body;
print character_limiter($body_text, 210);
?>
<p>Author: <?=$row->author_id?></p>
<p><?=anchor('blog/more/'.$row->id, 'Read on');?></p>
<p><?=anchor('blog/comments/'.$row->id, 'Comments');?></p>
<hr>
<?php endforeach; ?>
It displays the author id for now (entries.author_id = authors.id), I want it to display the author first (authors.first_name) and last name (authors.last_name). Could you please help me?
Here is the blog controller:
Code:
function index() {
$data['title'] = "My Blog Title";
$data['heading'] = "My Blog Heading";
$data['query'] = $this->db->get('entries');
$this->load->view('blog_view', $data);
}