From 3aea8f89f3e6fbeac7b77600320617a888cfc990 Mon Sep 17 00:00:00 2001 From: Alexander Yakovlev Date: Wed, 11 Apr 2018 18:11:03 +0700 Subject: [PATCH] Print array of authors --- Game.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Game.php b/Game.php index ec8548a..72b385c 100644 --- a/Game.php +++ b/Game.php @@ -32,7 +32,11 @@ class Game { if (FORMAT === 'HTML') { $output = "
  • «".trim($this->title)."»"; if ($this->author) { - $output .= " — ".trim($this->author).""; + if (is_array($this->author)) { + $output .= " — ".implode(', ', array_map('trim', $this->author)).""; + } else { + $output .= " — ".trim($this->author).""; + } } } }