Re: [PHP] test for associative or numerically indexed array

2003-03-20 Thread cpaul
> So much for the "theory" - what are you really trying to achieve? Maybe > there's something you can redesign so you're not relying on the fact if an > array is "enumerated" or not. thanks very much for your help - i understand now that no matter what kind of array i think i'm making, it is bein

Re: [PHP] test for associative or numerically indexed array

2003-03-20 Thread Ernest E Vogelsinger
At 09:57 20.03.2003, cpaul said: [snip] >> as associative array. Take this example: >> $a = array('one','two','three'); >> $b = array(); $b[0] = 'one'; $b[1] = 'two'; $b[2] = 'three'; >> $c = array(0 => 'one', 1 => 'two', 2 => 'three'); >> >> Whi

Re: [PHP] test for associative or numerically indexed array

2003-03-20 Thread cpaul
> At 08:52 20.03.2003, cpaul said: > [snip] > >ok thanks - that makes sense. sort of doesn't solve my problem, because > >if my function receives an enumerated array, i want it to treat it as an > >associative array, using the value as the key. >

Re: [PHP] test for associative or numerically indexed array

2003-03-20 Thread Ernest E Vogelsinger
At 08:52 20.03.2003, cpaul said: [snip] >ok thanks - that makes sense. sort of doesn't solve my problem, because >if my function receives an enumerated array, i want it to treat it as an >associative array, using the value as the key. [sn

Re: [PHP] test for associative or numerically indexed array

2003-03-19 Thread cpaul
> --- cpaul <[EMAIL PROTECTED]> wrote: > > Is there a method to test whether or not an array is associative? [EMAIL PROTECTED] wrote: > It's all the same. An enumerated array is really an associative array where > every key is an integer. Just treat them all like associative arrays, and > you'l

Re: [PHP] test for associative or numerically indexed array

2003-03-19 Thread Chris Shiflett
--- cpaul <[EMAIL PROTECTED]> wrote: > Is there a method to test whether or not an array is associative? > > I'm trying to make a function that can deal with whatever type of > array (associative or numeric) that is thrown at it. It's all the same. An enumerated array is really an associative arr

[PHP] test for associative or numerically indexed array

2003-03-19 Thread cpaul
Is there a method to test whether or not an array is associative? I'm trying to make a function that can deal with whatever type of array (associative or numeric) that is thrown at it. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php