// Method definition class Artist { // ... public function outputAsTable() { $table = "
"; $table .= $this->firstName . " " . $this->lastName; $table .= " | |
---|---|
Birth: | "; $table .= "" . $this->birthDate; $table .= "(" . $this->birthCity . ") |
Death: | "; $table .= "" . $this->deathDate . " |