I've got two arrays, an array of integers and an array of strings. I want to combine these two, but this is proving troublesome to me.
Basically, the first value in each array will be associated, the second value of each array will be associated, third with each other, and so on.
I've got a foreach
loop iterating over and using $result
as array key, as such:
foreach ($results as $result) {
And then a function to generate $order based on said string.
I am then trying to associate each value as I said, where I would have something like:
array('8' => 'value', '8' => 'value', '6' => 'anothervalue', '6' => 'anothervalue');
Here's the code I have.
$order = resource_library_apachesolr_resource_type_order($resource_type);
$result['resource_type'] = $resource_type;
$newresults = array($order => $result);
$order
isn't iterating, so how would I make it so that I get the iterated value of $order
combined with the currently iterating value of $result
?