note 44392 deleted from function.array-combine by aidan

From: Date: Sat, 22 Jan 2005 12:22:40 +0000
Subject: note 44392 deleted from function.array-combine by aidan
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-83774@lists.php.net to get a copy of this message
Note Submitter: kevlar at ccs dot neu dot edu ---- for those of you who do not have the ability to upgrade to php5 or dont want to bother with the pear stuff and just want a simple function def this func that i put together may work just as well as the php5 version <?php function arraycombine($a, $b) { $num = count($a); if ($num != count($b) || $num == 0) return false; $a = array_values($a); $b = array_values($b); $c = array(); for ($i = 0; $i < $num; $i++) { $c[$a[$i]] = $b[$i]; } return $c; } ?>

« previous php.notes (#83774) next »