public static function array_flatten(array $array){
		$index = 0;
		$count = count($array);

		while ($index < $count) {
			if (is_array($array[$index])) {
				array_splice($array, $index, 1, $array[$index]);
			} else {
				++$index;
			}
			$count = count($array);
		}
		return $array;
	}