. */ /** * Money column */ class MoneyColumn extends TextColumn { /** * Constructor * * @param string name of the column (as provided in the parameter of getCellValue()) * @param string header value */ public function __construct($name, $header) { parent::__construct($name, $header); } public function getCellValue($rowNum, $row) { if( $row[$this->name] == null || $row[$this->name] == 0 ) { return ""; }else { setlocale(LC_MONETARY, 'nl_NL'); return "€ ".str_replace(" ", "  ", money_format("%!#3.2i", $row[$this->name])); } } } ?>