00001 <?php
00016 class PPFBaseLookup
00017 {
00026 function getLookupArray($indexes, $from, $to, $ignore)
00027 {
00028 $from = strtolower($from);
00029 $to = strtolower($to);
00030 $ignore = array_flip($ignore);
00031
00032 if(isset($indexes[$from]) && isset($indexes[$to]))
00033 {
00034 $combined = array();
00035
00036 for($i=0; $i < count($indexes[$from]); $i++)
00037 if(!isset($ignore[$indexes[$from][$i]]))
00038 $combined[$indexes[$from][$i]] = $indexes[$to][$i];
00039
00040 return $combined;
00041 }
00042
00043 return false;
00044 }
00045 }
00046 ?>