Jump to content

Recommended Posts

Posted

Hello, I have been trying to figure out a way to export a text file but I have no clue where to start. Can anyone please help me out??

 

Here is the basic coding for my script......

 

 

if(isset($loose)){

 

echo $prefix . $zero . "000" . "

";

 

while($count<=8){

 

echo $prefix . "000" . ++$count . "

";

 

}

 

}

 

 

everything is working fine, however what I want to do is be able to export this text to a text file by the name of

$prefix-0000-0009

 

does any one have any ideas on how i can do this??

 

any help will be appreciated.

 

Thanks

Posted

Okay, I found out how to write a text file for anyone that needs it.....here is the code......

 

$myFile = "testFile.txt";

$fh = fopen($myFile, 'w') or die("can't open file");

$stringData = "Floppy Jalopy\n";

fwrite($fh, $stringData);

$stringData = "Pointy Pinto\n";

fwrite($fh, $stringData);

fclose($fh);

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...