I need an is_hash (or is_associative_array) function... anyone got a solution?
All php arrays are associative arrays.
Ya, I kind of noticed that.
So you're telling me there's no way to know if an array was declared like
array('foo' => 'bar');
or
array('foo', 'bar');
?
well, u cudd try by checking if the index of the array is numeric by using the function is_numeric()
is this an associative array?
array('0' => 'bar');
I would say no, because you can access that element using the integer index too:
i.e.
<?php $a = array('1' => 'foo'); print $a[1]; ?>
works.
Diego