- array_map: documentation ( source)
- print_r: documentation ( source)
- range: documentation ( source)
<?php
$a = range(1,25);
$b = array('21'=>'test');
$t = array_map('associate', $a);
function associate($a) {
$r = (isset($b[$av]))?$b[$a]:null;
}
print_r($t);