View Single Post
Old 02-06-2005, 06:57 PM  
smashface
Confirmed User
 
Industry Role:
Join Date: Sep 2002
Location: San Francisco, California
Posts: 991
Any php gurus here? Array_walk help needed

Im trying to create a file by using each element of an array as the filename. I have the following code and am getting an Invalid argument error.

$newfile = file("newdata.txt");

function touchfile($foo) {

touch($foo);

}

array_map ("touchfile", $newfile);

The error is occurring in the touch line.

Any suggestions are appreciated.

Chris
smashface is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote