note 59458 deleted from function.array-combine by nlopess
| From: | nlopess@php.net | Date: | Thu, 15 Feb 2007 13:22:44 +0000 |
| Subject: | note 59458 deleted from function.array-combine by nlopess | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-123439@lists.php.net to get a copy of this message | ||
Note Submitter: glashio.at.gmail.com
----
I encounterd a "Fatal Error" on PHP4 while i developed on PHP5 using : array_combine($a,
$b);
__TOP_OF_SCRIPT__
if (!function_exists('array_combine')) {
function array_combine($a, $b) {
$c = array();
if (is_array($a) && is_array($b))
while (list(, $va) = each($a))
if (list(, $vb) = each($b))
$c[$va] = $vb;
else
break 1;
return $c;
}
}