PHP's list
keyword is nice for taking out variables from an array $a as below
$a = array(1,22);
list($b, $c) = $a;
var_dump("$a $b $c");
But for array $a2 in the form of key => value
as below, I failed to use list
$a2 = array('b'=>1,'c'=>22);
list($b, $c) = $a2;
list($bkey, $b, $ckey, $c) = $a2;
list( list($bkey, $b), list($ckey,$c) ) = $a2;
var_dump("$a2 $b $c");
All of the three above assignments fail. I give up.
If you know how to get the key & value in array $a2, please help!