Display html header of table with several options.
Tags:
author:
Roan Embrechts
version:
1.01
Parameters:
$properties,
$properties
array with elements, all of which have defaults "width" - the table width, e.g. "100%", default is 85% "class" - the class to use for the table, e.g. "class=\"data_table\"" "cellpadding" - the extra border in each cell, e.g. "8",default is 4 "cellspacing" - the extra space between cells, default = 0
This function has more options and is easier to extend than display_table_row()
Tags:
todo:
add valign property
Parameters:
$properties,
$properties
array with properties: ["bgcolor"] - the background colour for the table ["is_alternating"] - true: the row colours alternate, false otherwise ["align_row"] - an array with, per cell, left|center|right
Titles for the table header each item in this array can contain 3 values
1st element: the column title
2nd element: true or false (column sortable?)
3th element: additional attributes for
th-tag (eg for column-width)
4the element: additional attributes for the td-tags
array
$content
2D-array with the tables content
array
$sorting_options
Keys are: 'column' = The column to use as sort-key 'direction' = SORT_ASC or SORT_DESC
array
$paging_options
Keys are: 'per_page_default' = items per page when switching from full- list to per-page-view 'per_page' = number of items to show per page 'page_nr' = The page to display
array
$query_vars
Additional variables to add in the query-string
array
$column_show
Array of binaries 1= show columns 0. hide a column
array
$column_order
An array of integers that let us decide how the columns are going to be sort. i.e: $column_order=array('1''4','3','4'); The 2nd column will be order like the 4th column
Titles for the table header each item in this array can contain 3 values
1st element: the column title
2nd element: true or false (column sortable?)
3th element: additional attributes for
th-tag (eg for column-width)
4the element: additional attributes for the td-tags
array
$content
2D-array with the tables content
array
$sorting_options
Keys are: 'column' = The column to use as sort-key 'direction' = SORT_ASC or SORT_DESC
array
$paging_options
Keys are: 'per_page_default' = items per page when switching from full- list to per-page-view 'per_page' = number of items to show per page 'page_nr' = The page to display