|
-
Jul 14th, 2006, 09:22 AM
#1
Thread Starter
Member
Writing a file?
I'm stuck. I have this php code that basically loops through a file and puts it all in a variable. But is there a way to save that variables info to a new file or in an existing one???
<?php
$lines = file('storage.xml');
$vars = "";
foreach ($lines as $line_num => $line) {
$vars .= htmlspecialchars($line) . "<br />\n";
}
echo $vars;
?>
is there a way to put the contents of $vars in to a blank file (basically creating a new one) or an existing xml file???
thanks, your help is much appreciated
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|