[eluser]Unknown[/eluser]
function display(){
$img_id = 1;
$this->load->database();
$this->db->select('img_name, img_id');
$query = $this->db->get('upload',array('img_id' => $img_id ));
echo "<pre>"; print_r($query);echo "</pre>";
echo "<pre>"; print_r($this->db->get('upload'));echo "</pre>";
foreach ($query->result() as $row)
{
echo "<pre>"; print_r($row);echo "</pre>";
$temp['image']['img_id'] = $row->img_id;
$temp['image']['img_name'] = $row->img_name;
}
$this->load->view('showImage');
}
<?php foreach($image as $row):?>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>Image Id</td>
<td>
<?php echo $row['img_id'];?>
</td>
</tr>
<tr>
<td>Image Name</td>
<td>
<?php echo $row['img_name'];?>
</td>
</tr>
</table>
<?php endforeach;?>
I have this funcion, in Controller, and I want to display it in View, I have tried it alot, but I can't write its View File,and I get these errors while... Help me, cz i m hanged