hosts() as $host) array_push($hosts, $host->full_name); return $this->comma_join($hosts); } public function comma_join($list) { $out = ""; if (count($list) <= 1) $out = $list[0]; elseif (count($list) == 2) $out = $list[0] . " and " . $list[1]; else { for ($x = 0; $x < count($list); $x++) { if ($x > 0) $out .= ", "; if ($x == count($list) - 1) $out .= " and "; $out .= $list[$x]; } } return $out; } public function settings() { if (!$this->_settings) $this->_settings = Settings::fetch(); return $this->_settings; } } ?>