Re: [PHP] Write an array to a file

2002-01-29 Thread Mike Frazer
if (!$file=fopen("file.txt", "r")) { echo "Error opening file"; } else { $input_string = fread($file,2048); } $company = explode("|", $input_string); #------------- -schnippy > -Original Message- > From: Scott Saraniero [mailto:[EMAIL PROTECTED]

RE: [PHP] Write an array to a file

2002-01-29 Thread Greg Schnippel
ny = explode("|", $input_string); #- -schnippy > -Original Message- > From: Scott Saraniero [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, January 29, 2002 12:34 PM > To: [EMAIL PROTECTED] > Subject: [PHP] Write an array to a

Re: [PHP] Write an array to a file

2002-01-29 Thread Chris Boget
> How do I write an array to a file? For example, I need to write just this in > a file: > ?> > I've been hung up for 2 days on this. Any help would be appreciated. Use serialize prior to writing the data to the file and unserialize upon retrieval. Chris -- PHP General Mailing List (http://w

[PHP] Write an array to a file

2002-01-29 Thread Scott Saraniero
Hi, How do I write an array to a file? For example, I need to write just this in a file: I've been hung up for 2 days on this. Any help would be appreciated. Thanks, Scott -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-