- array_map: documentation ( source)
- var_dump: documentation ( source)
<?php
$keys = array(1,2,3,6,9); //note that 9 does not exist as key in the $values array
$values = array('000', '001', '002', '003', '004', '005', '006', '007');
$new = array_map( function( $key) use( $values) {
return $values[ $key ];
}, $keys);
var_dump( $new);