Can’t attach file (as PHP or TXT) - something about invalid MIME type.
Bulk of code, although not all, is :-
// --------------------------------------------------------------------
/**
* Sets a list of comma-separated columns (by name) to exclude from the table, including headings
* If 'set_heading' has been used, the heading and column name must match for this to work
*
* @access public
* @return void
*/
function exclude_columns($column_list)
{
// explode out into an array so we can remove and white space
$aryColumns = explode(",",$column_list);
$aryNewColumns = array();
foreach ($aryColumns as $column) {
// trim the white space
$column = trim($column);
if ($column != '') {
// add back to the new array if it's not blank
$aryNewColumns[] = $column;
}
}
// implode back into an array
$this->columns_to_exclude = implode(",",$aryNewColumns);
}
// --------------------------------------------------------------------
Should run under any version of PHP.
It is fully tested, using both automatic headers and user defined ones. There is a documented caveat to the headers, where the heading name doesn’t match the column name, but this can easily be sorted by including both name variations in the exclude list.
I’ll check the coding standards, but I copied the same format as was already there.
Rob.