Hi, i have this code which outputs data from a MySQL db seperated by ,'s. i would like to know how to remove the last , from the list... any ideas??
mycode:
any ideas??
Regards,
Martin
Gaming Help And Info:
mycode:
Code:
<?php
include "../../nep-yb/config.php";
$i=0;
$qT = mysql_query("SELECT uid FROM member") or die(mysql_error());
$amt = mysql_num_rows($qT);
echo "&amnt=$amt";
//
echo "&user=";
$q = mysql_query("SELECT nick FROM member") or die(mysql_error());
while(list($n) = mysql_fetch_row($q)){
echo $n . ",";
}
//
echo "&uid=";
$q = mysql_query("SELECT uid FROM member") or die(mysql_error());
while(list($uid) = mysql_fetch_row($q)){
echo $uid . ",";
}
?>
any ideas??
Regards,
Martin
Gaming Help And Info: