public static function keyval_to_assoc($array, $key_field, $val_field)
	{
		if ( ! is_array($array) and ! $array instanceof \Iterator)
		{
			throw new \InvalidArgumentException('The first parameter must be an array.');
		}

		$output = array();
		foreach ($array as $key => $value)
		{
			$output[] = array(
				$key_field => $key,
				$val_field => $value
			);
		}

		return $output;
	}