0) { foreach ($value as $single) { $subject = digimina_get_subject_name_from_id($single); if ($subject) { $output[] = $subject; } } } if (sizeof($output) > 0) { echo implode(', ', $output); }