我有这个代码:
<?
$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]'");
$html = array();
while($cat2=mysql_fetch_array($kate2)){
$cat2['name_cat'].",";
}
}?>
我想输出没有最后一个逗号的类别!谢谢 !