public static function getCategoryNames($id_categs){
$db = JFactory::getDbo();
$query = "SELECT category,id FROM #__jblance_category c WHERE c.id IN ($id_categs)";
$db->setQuery($query);
$cats = $db->loadColumn();
if($cats)
return implode($cats, ", ");
else
return '';
}
return '<span>' . implode($cats, ", ") . '<span>' ;
echo getCategoryNames('нечто');
return "<span>" . implode($cats, "</span>, <span>") . "</span>";
public static function getCategoryNames($id_categs){
$db = JFactory::getDbo();
$query = "SELECT category,id FROM #__jblance_category c WHERE c.id IN ($id_categs)";
$db->setQuery($query);
$cats = $db->loadColumn();
if($cats)
return implode("<span>". $cats ."</span>,");
else
return '';
}