Ver original$ids = array();while($login = mysql_fetch_array($res)){ $ids[] = $login['login'];} $idsTxt = implode(', ', $ids);