public static function flattenArray($array, $prefix = null, $results = array()) {
		foreach ($array as $key => $val) {
			$name = (empty($prefix)) ? $key : $prefix."[$key]";

			if (is_array($val)) {
				$results = array_merge($results, self::flattenArray($val, $name));
			} else {
				$results[$name] = $val;
			}
		}

		return $results;
	}