I have two arrays:
$arrKeys = array('str', 'str', 'otherStr');
$arrVals = array('1.22', '1.99', '5.17');
I would like to merge them into something like this
$arrResult = array(
array('str' => 1.22),
array('str' => 1.99),
array('otherStr' => 5.17)
);
The keys are non-unique, otherwise I'd use array_combine. That would give a bit different output, but it would suit me as well.
Can this be done in an elegant way using PHP 5.2.x, without foreach/for loops, preferably using PHP's built-in functions?