Re: test for associative or numerically indexed array
| From: | cpaul | Date: | Thu, 20 Mar 2003 07:52:49 +0000 |
| Subject: | Re: test for associative or numerically indexed array | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-140404@lists.php.net to get a copy of this message | ||
> --- cpaul <inc@fastmedia.net> wrote:
> > Is there a method to test whether or not an array is associative?
shiflett@php.net 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'll be fine.
>
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.
the array index is not useful to me in this situation.
is there really no way to tell how an array was defined?
thanks for your time
--
chris paul