public static function create_directory_structure($folders, $base_dir) {
		if (!empty($folders) && is_array($folders)) {
			foreach ($folders as $name => $subfolders) {
				if (!file_exists($base_dir.$name.'/')) {
					mkdir($base_dir.$name.'/');
				}
				touch($base_dir.$name.'/index.html');
				if (!empty($subfolders) && is_array($subfolders)) {
					static::create_directory_structure($subfolders, $base_dir.$name.'/');
				}
			}
		}
	}
public static function create_directory_structure($folders, $base_dir) {
		if (!empty($folders) && is_array($folders)) {
			foreach ($folders as $name => $subfolders) {
				if (!file_exists($base_dir.$name.'/')) {
					mkdir($base_dir.$name.'/');
				}
				touch($base_dir.$name.'/index.html');
				if (!empty($subfolders) && is_array($subfolders)) {
					static::create_directory_structure($subfolders, $base_dir.$name.'/');
				}
			}
		}
	}
public static function create_directory_structure ( $ folders , $ base_dir ) { if ( ! empty ( $ folders ) && is_array ( $ folders ) ) { foreach ( $ folders as $ name => $ subfolders ) { if ( ! file_exists ( $ base_dir . $ name . '/' ) ) { mkdir ( $ base_dir . $ name . '/' ) ; } touch ( $ base_dir . $ name . '/index.html' ) ; if ( ! empty ( $ subfolders ) && is_array ( $ subfolders ) ) { static :: create_directory_structure ( $ subfolders , $ base_dir . $ name . '/' ) ; } } } }
Create a complete directory structure in a given path.

@param array $folders An array representing the structure to be created. Keys are folder names, values are arrays of
subfolders (with keys being names and values being subfolders, etc)
@param string $base_dir The directory to create the structure in. Must include trailing slash.
Create a complete directory structure in a given path .