Jochem,
Yes, that did the trick quite nicely.
As I said, I overlooked it... a function called array_combine did
not cause me to read the drill-down, because I figured it was for a
union of two arrays ( it is, kind of... ) and I wanted to replace key
values, not combine arrays : array_c
[EMAIL PROTECTED] wrote:
> Jochem,
>
> Yes, that did the trick quite nicely.
>
> As I said, I overlooked it... a function called array_combine did not
> cause me to read the drill-down, because I figured it was for a union of
> two arrays ( it is, kind of... ) and I wanted to replace key valu
[EMAIL PROTECTED] wrote:
> Quoting Jochem Maas <[EMAIL PROTECTED]>:
>
...
>>
>> $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/array
>
Quoting Jochem Maas <[EMAIL PROTECTED]>:
[EMAIL PROTECTED] wrote:
Hello All,
Is the a built-in PHP call that I am overlooking which lets me
replace key values in an array.
$inputArray = array(0 => array, 1 => array); (generated programtically)
I want to end up with :
$newArray
[EMAIL PROTECTED] wrote:
> Hello All,
>
> Is the a built-in PHP call that I am overlooking which lets me
> replace key values in an array.
>
>$inputArray = array(0 => array, 1 => array); (generated programtically)
>
>I want to end up with :
>
>$newArray = array('FAF1' => array,
- Original Message -
From: <[EMAIL PROTECTED]>
To:
Sent: Wednesday, December 05, 2007 1:00 PM
Subject: [PHP] Array numeric key -> alpha key replacement
Hello All,
Is the a built-in PHP call that I am overlooking which lets me
replace key values in an array.
$i
Hello All,
Is the a built-in PHP call that I am overlooking which lets me
replace 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.
7 matches
Mail list logo