"fixed php4 problem reported on the user-list: undefined function: array_combine(),"

This commit is contained in:
Ralf Becker 2007-10-01 10:36:17 +00:00
parent 84db48756f
commit 2c66992d1d

View File

@ -956,3 +956,17 @@
return $fields;
}
}
if (!function_exists('array_combine')) // php5+
{
function array_combine($keys,$values)
{
$combined = array();
$values = array_values($values);
foreach(array_values($keys) as $n => $key)
{
$combined[$key] = $values[$n];
}
return $combined;
}
}