TableTemplates

Derek Jones edited this page Jul 5, 2012 · 8 revisions
Clone this wiki locally

Category:Help | Category:Help::TipsAndTricks | Category:Help::Templates

Code Igniter supports use of multidimensional arrays as parameters to a table template.

Example

<table class="tbl" >
    <thead>
    <tr>
        {fields}
            <th class='tbl_headercell'>{lbl}</th>
        {/fields}
    </tr>
    </thead>
    <tbody class="scrollingContent">
        {rows}
            <tr>
                {cols}
                    <td align="{align}">{value}</td>
                {/cols}
            </tr>
        {/rows}
    </tbody>
</table>