> > from memory. >> >> $var=''; >> while($row = mysql_fetch_array($charge_result2)) >> { >> $var .= $row['id'] . ','; >> } >> >> cheers, >> >> tedd > > Thanks all! It works and here is the code I used: $get_charges2 = "SELECT FIRST 16 * FROM history WHERE id = '$id"; $charge_result2 = ifx_query ($get_charges2, $connect_id); while ($charge_row2 = ifx_fetch_row($charge_result2)) { $charges .= $charge_row2['id'].","; }