headers = $headers; $this->cols = count($headers); } function addrow($row) { if (count($row) != $this->cols) return false; array_push($this->table_array, $row); return true; } function output() { print "
";
		foreach($this->headers as $headers)
			print "$headers";
		print "\n";
		foreach($this->table_array as $y)
		{
			foreach($y as $xcell)
				print "$xcell";
			print "\n";
		}
		print "
"; } } $test = new table(array("a","b","c")); $test->addrow(array(1,2,3)); $test->addrow(array(4,5,6)); $test->output(); ?>