I am working with codeigniter. I want to fetch a single row with passed index. If I pass 0
then first row should be display if 2
then second. etc
Here is my little code.
$qu['tid'] = mysqli_query($con , "select * from tablename");
$this->load->view('admin/panel1' , $qu);
view code.
<table>
<tr>
<th>ID</th>
<th>Name</th>
</tr>
<tr>
<td><?php echo $tid['id'];?></td> // given row if 1 or 2
<td><?php echo $tid['name'];?></td>// given row if 1 or 2
</tr>
</table>