CodeIgniter Forums
big problem.... - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: big problem.... (/showthread.php?tid=34193)



big problem.... - El Forum - 09-22-2010

[eluser]braca86[/eluser]
i thing this is the right forum to write... im new to the codeignite so i hope someone can help me…

i made a query that is pulling some informactions from database and everything is working fine but i cant see the records from database… how? well i make ordered list and i can se for instance 4record but they are not displaying… like this

1.
2.
3.
4.
instead of this

1. first record
2. second
3. third
4. fourth

code:
conroler:
function index()
{
$data[‘query’] = $this->db->get(‘tablefield’);
$this->load->view(‘blog_view’, $data);
}

view:
<?php foreach($query->result() as $row): ?>
<ol>
<li> &lt;?php $row->record ?&gt; </li>
</ol>
<hr>
&lt;?php endforeach; ?&gt;


big problem.... - El Forum - 09-22-2010

[eluser]braca86[/eluser]
i cant delete this i posted same thread in bug reports sections and got answer so som1 plz delete this...


big problem.... - El Forum - 09-22-2010

[eluser]techgnome[/eluser]
Even though you mentioned you got the answer... I'm going to post what I think the problem/answer is in case some one else is having the same problem.

The problem is this line:
&lt;?php $row->record ?&gt;

It's not echoing the value... should read:
&lt;?php echo $row->record ?&gt;
now it'll be sent to the browser properly.

-tg


big problem.... - El Forum - 09-22-2010

[eluser]braca86[/eluser]
the soluction to the problem is in other thread i made duplicate by accident...
http://ellislab.com/forums/viewthread/168162/