Re: Reading from various .txt files in directory

From: Date: Tue, 27 May 2003 11:56:21 +0000
Subject: Re: Reading from various .txt files in directory
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-149086@lists.php.net to get a copy of this message
On Tuesday 27 May 2003 16:08, TWSC HQ wrote: > Is the following possible and how do you do it? > > I have various .txt files in a single directory - all in the same format: > > Content of abc.txt file: > > 1%23%5%2003%0.00%0.00%7.78 > > Content of def.txt file: > > 9%20%5%2003%0.00%0.00%100.00 > > Data is seperated by a % sign - > Now, how do I display the 2nd, 3rd, 4th and last entry (for each file in > the directory) in table format in a browser? > > In other words I need the output to be in browser : > > 23 5 2003 7.78 > 20 5 2003 100.00 > > Trick is that the .txt file names are randomly generated - they can be > abc.txt, gyu.txt, iyu.txt etc. Start playing around with fgetcsv() to read in a file and readdir() to list files in directory. -- Jason Wong -> Gremlins Associates -> www.gremlins.biz Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * ------------------------------------------ Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general ------------------------------------------ /* Unix is the worst operating system; except for all others. -- Berry Kercheval */

« previous php.general (#149086) next »