我有以下数组:
$var_array = array(
"length" => 5,
"breadth" => 5,
"color" => "blue",
"size" => "medium",
"shape" => "square");
如何通过指定键从数组中提取选定的变量?
例如,如果我指定breadth
and size
,我会得到:
$breadth = 5;
$size = "medium";
$var_array = array(
"length" => 5,
"color" => "blue",
"shape" => "square");