CodeIgniter Forums
My MVC schema - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21)
+--- Thread: My MVC schema (/showthread.php?tid=36969)



My MVC schema - El Forum - 12-21-2010

[eluser]cyberjunkie[/eluser]
Hello all! I'm new to Codeigniter and MVC. I designed a pattern to look at when I'm lost. Please let me know if I got something wrong.

jump to image


My MVC schema - El Forum - 12-21-2010

[eluser]Bart v B[/eluser]
your lost because you variabele that you pass is $data['query']

So in simple code in your view should be that:

Code:
<?php foreach($query as $row): ?>
<li>&lt;?php echo $row->blog_entry;?&gt;</li>
&lt;?php endforeach; ?&gt;

Mind i am guessing the table name. Wink


My MVC schema - El Forum - 12-22-2010

[eluser]cyberjunkie[/eluser]
[quote author="Bart v B" date="1293012390"]your lost because you variabele that you pass is $data['query']

So in simple code in your view should be that:

Code:
&lt;?php foreach($query as $row): ?&gt;
<li>&lt;?php echo $row->blog_entry;?&gt;</li>
&lt;?php endforeach; ?&gt;

Mind i am guessing the table name. Wink[/quote]


Thanks! I think I got a good pattern to go by now Smile