badrobot Posted December 17, 2008 Share Posted December 17, 2008 This is straight forward, I'm sure I'm doing something wrong.... I am just trying to write this variable to a .txt fileIt does create and open the file correctlyBut instead of writing to the .txt file it outputs it to the browser. $order=fopen("/upload/".$filenam.".txt","a"); for ($i = 0; $i < 50; $i++) { echo $itemnum[$i].$qtynum[$i]; } fclose($order); Link to comment Share on other sites More sharing options...
badrobot Posted December 17, 2008 Author Share Posted December 17, 2008 this worked $order=fopen($filenam,"a"); for ($i = 0; $i < 50; $i++) { fwrite($order, $itemnum[$i].$qtynum[$i]); } fclose($order); Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.