<?$sql= "Select * From favori WHERE uye_id='1'"; $RS1=mysql_query($sql); while($RS1=mysql_fetch_assoc($RS1)){ $RSoyun_id[] = $RS1["oyun_id"]; } $gelen = implode(',',$RSoyun_id); echo $gelen;?>