Re: array to string

From: Date: Fri, 19 Oct 2001 16:30:58 +0000
Subject: Re: array to string
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-71602@lists.php.net to get a copy of this message
"René Fournier" <renefournier@yahoo.com> wrote: > Just trying to convert an array to string before writing the whole thing > back out to a file. (Trying to do a simple database-less database, using > text files). > > $fcontents = file($name.".db"); // THE ENTIRE TABLE > $fcontents[$update] = $updatedstring; // THE ROW TO BE UPDATED > $fp = fopen($name.".db", "w+"); > > But before the next line, I need to convert $fcontents to a string, else > just "Array" gets written to the text file. I just can't seem to find the > sure-to-be simple command to do this on php.net or phpbuilder.com, etc. Any > ideas? See implode(). $fcontents_string = implode( '', $fcontents ); -- Steve Werby President, Befriend Internet Services LLC http://www.befriend.com/

« previous php.general (#71602) next »