Re: .DAT file with PHP

From: Date: Wed, 08 Mar 2006 18:27:32 +0000
Subject: Re: .DAT file with PHP
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-231674@lists.php.net to get a copy of this message
$filename = "filename.txt"; $file_content = join("\n", array_reverse(file($filename))); echo $file_content; Questions? BTW I haven't tested this, so it may be completely wrong. On 3/8/06, Paul Novitski <paul@juniperwebcraft.com> wrote: > > At 07:41 AM 3/8/2006, Jabez Gan wrote: > >Sorry im new but, how do we read from a file to an array? I've studied C > but > >not with PHP and it's not working for me... Suggestions? > > > file() > Reads entire file into an array > http://php.net/file > > Doesn't require open & close. > > Paul > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > >

« previous php.general (#231674) next »