No luck there...
  ----- Original Message ----- 
  From: Brad S. Jackson 
  To: James Bartlett 
  Sent: Friday, July 06, 2001 8:01 PM
  Subject: Re: [PHP] Problem writting to file...




  Sometimes you have to do this to make it work.

  fwrite($fp, strval($counter) . "\n");


  "James Bartlett" <[EMAIL PROTECTED]> wrote:
  Hi,

  I'm trying to write data to a file but for some reason it will not store numbers
   in the file...Here's the code I'm using...(as an example)

  <?php
  $fp = fopen("./data.txt", "w+");
  $counter = 0;
  while ($counter <6)
  {
  fwrite($fp, $counter . "\n");
  $counter = $counter +1;
  }
  fclose ($fp);
  ?>

  Thanks for any help...

  James


Reply via email to