Welcome Guest, Not a member yet? Register   Sign In
Repetive html with based on dynamic data - view partial vs helper
#7

[eluser]msteudel[/eluser]
[quote author="noctrum" date="1272070316"]View 1:
Code:
<?php foreach( $districts as $district): ?>
    <tr>
        <td>&lt;?php echo $district['id']; ?&gt;</td>
        <td>&lt;?php echo $district['district_name']; ?&gt;</td>
        <td>&lt;?php echo $district['state_name']; ?&gt;</td>
        <td>&lt;?php $this->load->view( 'admin/district/format_actions', $district ); ?&gt;</td>
    </tr>
&lt;?php endforeach ?&gt;

View 2:
Code:
&lt;?php echo anchor( '/admin/district/update/' . $id, 'Edit'); ?&gt; |
&lt;?php echo anchor( '/admin/district/delete/' . $id, 'Delete'); ?&gt;
[/quote]

Oh ... I bet that's in the documentation ... thanks!


Messages In This Thread
Repetive html with based on dynamic data - view partial vs helper - by El Forum - 04-23-2010, 02:03 PM



Theme © iAndrew 2016 - Forum software by © MyBB