Ok this is going to sound daft but how to i show 1 record with zend framework, i know how to show many in a foreach but not how to show many.
controller
public function showAction()
{
$this->view->title = "Forum";
$this->view->headTitle($this->view->title);
/*
* Calls the Database table for the Categories.
*/
$category = new Forum_Model_DbTable_Categories();
$this->view->category = $category->fetchAll();
}
view file so far but of course its giving me all the records
<p><a href="<?php echo $this->url(array('controller'=>'topics', 'action'=>'add'));?>">Add new Topic</a></p>
<?php foreach($this->category as $category) : ?>
<?php echo $this->escape($category->title);?>
<?php endforeach; ?>