ok, it reads from a cookie and then connects to a database and displays the results:
foreach ($_COOKIE['basket'] as $name => $value)
{
$read = split(" ", ($value));
$item = $read[0];
$quantity = $read[1];
$db = mysql_connect("localhost","username","password");
mysql_select_db("database",$db);
$query = mysql_query("SELECT * FROM products WHERE model='$item'");
$get = mysql_fetch_array($query);
echo "<table><tr><td>".$get['price']."</td</tr></table>"
}
so that will give me the values, in each table. All i wanna do is add the prices together to get a total.
Cheers