Re: [PHP] Quick TXT document stuff

2001-08-30 Thread Steve Edberg
At 1:31 PM -0700 8/30/01, Kyle Smith wrote: >ok i have this code to do whats below, but its not working > > $fp = fopen("meh.txt","r"); >for($i=0;$i<2;$i++) >{ >print "$fp[$i]"; >} >?> That's because $fp is a file POINTER, not the actual contents of the file. You might have been thinking of t

Re: [PHP] Quick TXT document stuff

2001-08-30 Thread Franklin van Velthuizen
Kyle Smith wrote: >ok i have this code to do whats below, but its not working > Try to use file(), which will return an array. So that would be: $lines = file(filename); for($i=0; $i<2; $i++) { print($lines[$i]); } /franklin -- PHP General Mailing List (http://www.php.net/) To unsubscribe

Re: [PHP] Quick TXT document stuff

2001-08-30 Thread Tim
change the first line to $fp = file("meh.txt"); - Tim On Thu, 2001-08-30 at 16:31, Kyle Smith wrote: > ok i have this code to do whats below, but its not working > >$fp = fopen("meh.txt","r"); > for($i=0;$i<2;$i++) > { > print "$fp[$i]"; > } > ?> > > > -lk6- > http://www.StupeedStudios.

Re: [PHP] Quick TXT document stuff

2001-08-30 Thread Kyle Smith
ok i have this code to do whats below, but its not working -lk6- http://www.StupeedStudios.f2s.com Home of the burning lego man! ICQ: 115852509 MSN: [EMAIL PROTECTED] AIM: legokiller666 - Original Message - From: "Kyle Smith" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thurs