hey,
ok, my problem is when im obtaining data from a database. I need it in this format :- "0","23","45","56"
With the code at the bottom of the page i get very close to this:-
"0","23","45","56",
the only problem is with the comma at the end. I dont want it to display a comma at the end of the list of numbers. So really i need to know when the last record has been pulled from the DB, then not add a comma to the end, does that make sense?
Could anyone throw me a hand or any ideas where i should head, it has to be in the exact fromat shown at the top of the page!
cheers
ASH
//CODE SECTION
$username = $_SESSION['username'];
$testID = 1;
//$HTTP_SERVER_VARS['QUERY_STRING'];
$query1 = "SELECT * FROM Results WHERE Username = '$username' AND TestID = '$testID' ORDER BY ResultsID DESC LIMIT 10";
$result1 = mysql_query($query1);
if($row1 = mysql_fetch_array($result1,MYSQL_ASSOC))
{
$result222 = $row1[TestScore];
$comma = ",";
$result333 = '"'.$result222.'"'.$comma;
echo $result333;
}
?>
My new web design domain
www.askmultimedia.co.uk