| Recommend this page to a friend! |
| Packages of Michael Beck | Xoops 2.5 | htdocs/xoops_lib/vendor/smarty/smarty/docs/designers/language-custom-functions/language-function-html-table.md | Download |
|
|||||||||||||||||||||
{html_table}
Attributes| Attribute Name | Required | Description |
|----------------|----------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| loop | Yes | Array of data to loop through |
| cols | No | Number of columns in the table or a comma-separated list of column heading names or an array of column heading names.if the cols-attribute is empty, but rows are given, then the number of cols is computed by the number of rows and the number of elements to display to be just enough cols to display all elements. If both, rows and cols, are omitted cols defaults to 3. if given as a list or array, the number of columns is computed from the number of elements in the list or array. |
| rows | No | Number of rows in the table. if the rows-attribute is empty, but cols are given, then the number of rows is computed by the number of cols and the number of elements to display to be just enough rows to display all elements. |
| inner | No | Direction of consecutive elements in the loop-array to be rendered. cols means elements are displayed col-by-col. rows means elements are displayed row-by-row. |
| caption | No | Text to be used for the
Examples
The variables assigned from php could be displayed as these three examples demonstrate. Each example shows the template followed by output. Example 1
Example 2
Example 3 |