我有这个代码:
<?
$kate=mysql_query("select category_id from movies_cat where movie_id='$ids'");
while($cat=mysql_fetch_array($kate)){
$kate2=mysql_query("select name_cat from categories where id='$cat[category_id]'");
while($cat2=mysql_fetch_array($kate2)){
print $cat2['name_cat'];
}
}
?>
现在在此显示类别:ActionsComedyMystery,我想显示 Actions,Comedy,Mystery(末尾没有逗号)