static function is_associative_array($a, $ifEmptyAssociativeArray = false)
	{
        if( !is_array($a) )
            return false;
        if ( count($a) == 0 )
            return $ifEmptyAssociativeArray;
        
		// firstly, verify that all keys are ints ; if not, the array is associative
		$keys = array_keys($a);
		foreach ( $keys as $k )
			if ( !is_int($k) )
				return true;
				
        // if all keys are numeric, they must follow themselves : e.g. 0, 1, 2, 3 is OK, but 0, 3, 4 is NOT OK.
		return max($keys)+1 != count($a);
	}