data_source = $data_source; $this->fields = $fields; $this->entries = array(); if (array_key_exists("table_orderby",$_REQUEST) && in_array($_REQUEST['table_orderby'], $fields)) { $this->orderby = $_REQUEST['table_orderby']; } else { $this->orderby = $default_orderby; } } function add_row($row) { foreach (array_keys($row) as $k) { if (is_numeric($row[$k])) { $this->totals[$k]+=$row[$k]; } } array_push($this->entries,$row); } function aquire() { } }; ?>