Hi,

I've got a short hack that determines whether a PHP array is a simple 
sequential array or an associative array. The function loops through 
all the keys to see if any are non numeric.

function is_seq_array($php_array)
{
        foreach($php_array as $key => $value)
        {
                if ( ! is_numeric($key) ) return 0;
        }
        return 1;
}

Helpful? Too kludgey?

doug


-- 

--
For information about how to subscribe and unsubscribe from this list
visit http://xmlrpc.usefulinc.com/list.html

Reply via email to