well your code snipit allready shows your answer. $result = mysql_db_query($DBName, "SELECT * FROM basket WHERE UserID='$UID'"); while ($row = mysql_fetch_array($result)) { $CID = $row[0]; $DMN = $row[1]; $DMB = $row[2]; $BID = $row[4]; echo "Price: $DMB<br>\n"; } Chris Lee Mediawaveonline.com ""K.Simon"" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... How can i add all the fetched rows from a table? $result=mysql("$DBName","SELECT * FROM basket WHERE UserID='$UID'"); while ($row = mysql_fetch_array($result)) { $CID=$row[0]; $DMN=$row[1]; $DMB=$row[2]; $BID=$row[4]; do{ print "$DMB"; } Let's say i have to display the endprice from all the items from user $UID in the basket. Price from the items is in row $[2] or $DMB. How can i do that? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]