note 52715 deleted from function.array-combine by aidan
| From: | aidan@php.net | Date: | Wed, 03 Aug 2005 03:06:05 +0000 |
| Subject: | note 52715 deleted from function.array-combine by aidan | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-92982@lists.php.net to get a copy of this message | ||
Note Submitter: ungu at terong dot com
----
Simpler version of array_combine if you do not use PHP 5
<?
if (!function_exists('array_combine')) {
function array_combine($a, $b) {
$c = array();
$at = array_values($a);
$bt = array_values($b);
foreach($at as $key=>$aval) $c[$aval] = $b[$key];
return $c;
}
}
?>