PHP:
$cart = unserialize(stripslashes($_COOKIE["basket"]));
$test = false;
while ( list( $item, $qty ) = each($cart) )
{
$num = (int)$qty;
if ($num >= 1);
{
$test = true;
break;
}
}
if ($test == false)
{
echo 'theres noting in the cart';
}
what in trying to do is get something out of an associated array and check to see if any of the quantity is greater than or equal to 1 or print the error message.
but it $test always seems to be true even when all qty is less than 1