I want to use the values of my first array $selection (which are always numbers) as the keys for the other array $categories and output only the selected keys.
See code below, very new to php.
<?php
$selection = array('1', '4', '5');
$categories = array('fruit', 'bread', 'desert', 'soup', 'pizza');
$multiple = array_combine($selection, $categories);
print_r($multiple);
?>
so it should output something like:
Array ( [1] => fruit [4] => soup [5] => pizza )