Re: Array numeric key -> alpha key replacement
| From: | scotdiddle at silverdarkroom dot com | Date: | Wed, 05 Dec 2007 14:29:21 +0000 |
| Subject: | Re: Array numeric key -> alpha key replacement | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-265471@lists.php.net to get a copy of this message | ||
Quoting Jochem Maas <jochem@iamjochem.com>:
scotdiddle@silverdarkroom.com wrote:Jochem: Nope, not too much trouble... I tried to find what I was looking for on http://php.net/array. Sorry I was such a bother. ScotHello All,$newArray = array('FAF1', 'ODM1', /* bla bla bla */); $inputArray = array_combine($newArray, $inputArray); I guess reading through this page was too much trouble for you: http://php.net/arrayIs the a built-in PHP call that I am overlooking which lets mereplace key values in an array. $inputArray = array(0 => array, 1 => array); (generated programtically) I want to end up with : $newArray = array('FAF1' => array, 'ODM1' => array);Thanks.
Scot L. Diddle, UPS Freight, Richmond VA