to write files, you could use file_put_contents (if you're using php5) which really simplifies the process. you might want to check out file_get_contents, too, to streamline your file reading process, so you don't have to loop the array. to loop each directory, have a look at the readdir function.. throw in a bit of recursion, and bob's your uncle. for real. josh. Ron Piggott wrote:
I have this PHP code below that loads a web page into the "$message" variable $lineArray = file($web_page); // make an empty variable first $message = ""; // concat all array element foreach($lineArray as $eachLine) { $message .= $eachLine; } $additional_text = "blah blah blah"; $message = $additional_text . $message; and then write that to a file. I do not know the command to write it to a file. And I need to make this edit to each and every HTML file within my site === I am not sure how to tell the computer to open up each file within each directory. Ron
-- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php