Voting

: zero minus zero?
(Example: nine)

The Note You're Voting On

Michael
17 years ago
A slight modification of what's below:

<?php

function is_assoc($array)
{
return
is_array($array) && count($array) !== array_reduce(array_keys($array), 'is_assoc_callback', 0);
}

function
is_assoc_callback($a, $b)
{
return
$a === $b ? $a + 1 : 0;
}

?>

<< Back to user notes page

To Top