I'm calling a function that assigns value to a multi-dim array key using a switch function; however, the first time I call the function, the value assigned to the key is truncated. For instance, in the snippet below, a value of '1' for the var $grind results in the key 'grindtype' being assigned the value 'B', not 'Beans'. Subsequent calls to this function in the same session perform as expected.
$grind = $_GET['grind'];
switch($grind)
{
case '1':
$_SESSION['basket'][$prodid]['grindtype'] = 'Beans';
break;
case '2':
$_SESSION['basket'][$prodid]['grind'] = Drip;
break;
case '3':
$_SESSION['basket'][$prodid]['grindtype'] = 'French Press';
break;
case '4':
$_SESSION['basket'][$prodid]['grindtype'] = 'Espresso';
break;
}