[thelist] writing array contents to file

Aaron Vegh aaronvegh at gmail.com
Sun Jun 22 07:28:51 CDT 2008

Hi there,
I have an array that contains directory names, file names and file
contents. I need to write a function that iterates through the array,
and for each array key that doesn't contain a "." write a directory
instead of a file. Here's a simplified array that's structured
similarly to the target array:

$array = array(
				"file1.txt"=>"file1 contents",
				"file2.txt"=>"file2 contents"),
					"conf1.txt"=>"conf1 contents",
					"conf2.txt"=>"conf2 contents"),
			"config.txt"=>"configuration contents");

I've made a number of attempts, but I can't seem to get it figured
out! Any help would be appreciated. :-)

Aaron Vegh, Principal
Innoveghtive Inc.
P: (647) 477-2690
C: (905) 924-1220

More information about the thelist mailing list