Как уже упоминалось в @AbraCadaver, вы пытаетесь получить доступ к элементу fruit
целочисленного индекса (не к ассоциативному массиву).
<code>// your current array
$selection = array(
array('fruit' => 'apple', 'normal_price' => 3.75, 'status' => 'discounted'),
array('fruit' => 'orange', 'normal_price' => 4.15, 'status' => 'non-discounted'),
array('fruit' => 'grapes', 'normal_price' => 8.35, 'status' => 'discounted'),
array('fruit' => 'mango', 'normal_price' => 6.65, 'status' => 'discounted'),
array('fruit' => 'peach', 'normal_price' => 5.45, 'status' => 'non-discounted'),
array('fruit' => 'kiwi', 'normal_price' => 3.75, 'status' => 'non-discounted'),
array('fruit' => 'melon', 'normal_price' => 9.05, 'status' => 'non-discounted'),
array('fruit' => 'pomegranate', 'normal_price' => 7.95, 'status' => 'discounted')
);
// to do what you imply by your code
$selection = array(
'apple'=>array('normal_price' => 3.75, 'status' => 'discounted'),
'orange'=>array('normal_price' => 4.15, 'status' => 'non-discounted'),
'grapes'=>array('normal_price' => 8.35, 'status' => 'discounted'),
'mango'=>array('normal_price' => 6.65, 'status' => 'discounted'),
'peach'=>array('normal_price' => 5.45, 'status' => 'non-discounted'),
'kiwi'=>array('normal_price' => 3.75, 'status' => 'non-discounted'),
'melon'=>array('normal_price' => 9.05, 'status' => 'non-discounted'),
'pomegranate'=>array('normal_price' => 7.95, 'status' => 'discounted')
);
function array_picker($fruit, $sel_ind2, $sel_ind3, $arr_specimen)
{
print "{$arr_specimen[$fruit][$sel_ind2]} <br>";
print "{$arr_specimen[$fruit][$sel_ind3]} <br>";
echo "<pre>";
print_r($arr_specimen);
echo "
";
}
array_picker ('apple', 'normal_price', 'status', $ selection);