I'm trying to get the value of a given key if found using the array_key_exists function. 
$var = 35;
if(array_key_exists($var, $_SESSION['cart_items']))
{
    //give the value of found key
}
else
{
    $_SESSION['cart_items'][$var] = $anothervar;
}
For now, I only have this:
Array
(
    [35] => 3
    [41] => 6
)
So what I wanted to get is the value 3. Is there a simple way to do this?
 
     
    