Welcome Guest, Not a member yet? Register   Sign In
Best practices:building html with CI
#2

[eluser]Aken[/eluser]
Load the items from your DB into the view, and then loop them.

Code:
<?php foreach ($results as $row): ?>

<h2>&lt;?php echo $row->title; ?&gt;</h2>
<p>&lt;?php echo $row->field; ?&gt;</p>

&lt;?php endforeach; ?&gt;


Messages In This Thread
Best practices:building html with CI - by El Forum - 07-16-2012, 10:06 AM
Best practices:building html with CI - by El Forum - 07-16-2012, 08:50 PM
Best practices:building html with CI - by El Forum - 07-17-2012, 11:32 AM
Best practices:building html with CI - by El Forum - 07-17-2012, 11:41 AM
Best practices:building html with CI - by El Forum - 07-17-2012, 03:02 PM
Best practices:building html with CI - by El Forum - 07-17-2012, 06:43 PM
Best practices:building html with CI - by El Forum - 07-17-2012, 08:39 PM
Best practices:building html with CI - by El Forum - 07-17-2012, 11:38 PM
Best practices:building html with CI - by El Forum - 07-18-2012, 05:55 AM



Theme © iAndrew 2016 - Forum software by © MyBB