<?php $str = "1,5"; $base = array('1'=>'Bread','5'=>'Butter'); $replacements = array_values( array_intersect_key( $base, array_flip( explode(',', $str)))); print_r( $replacements);
You have javascript disabled. You will not be able to edit any code.