When no cookie is set at all, the else statement should be executed. But, it's executing the first statement instead, echoing sizeof will output "0" and since the $_COOKIE array is truly 0, the foreach will not even go thru one loop, so why is it even going thru the first statement in the first place, when the array is not greater than 0?
<?php
if (sizeof($COOKIE > 0))
{
echo sizeof($COOKIE);
foreach ($_COOKIE as $field=>$value)
{
echo $field . ": " . $value . "<br>";
}
} else {
echo "Unable to find cookie!";
}
?>