note 39338 deleted from ref.array by tomsommer

From: Date: Sun, 25 Jan 2004 14:56:08 +0000
Subject: note 39338 deleted from ref.array by tomsommer
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-64149@lists.php.net to get a copy of this message
Note Submitter: alan-smith@belcenter.com ---- <?php function array_combine($array_keys, $array_values) { /* * Returns an array by using the values from the keys array * as keys and the values from the values array as the corresponding values. */ $t = array(); $lg = count($array_keys); for($i=0;$i<$lg;$i++){ $key = $array_keys[$i]; $t[$key] = $array_values[$i]; } return $t; } // Usage : array_combine (array_keys, array_values); ?>

« previous php.notes (#64149) next »