PHP Read TXT Files and Output Table

Completed Posted Mar 1, 2012 Paid on delivery
Completed Paid on delivery

-

I need a php page that reads all txt files in a directory, extracts a variable from each file, counts the number of items in that variable (it contains csv values), and once the last file has been read, prints a table with one row for each file, a column with the file name, and a column with the item count.

Here's what the contents of each txt file is like: "&faFile=50069.wav&fps=2&scale=100&smoothing=0&dBValues=0&stereo=0&amplitude=(13, 5, 3, 11, 10, 4, 3, 2, 2, 2, 23, 18, 17, 18, 2, 8, 7, 9, 8, 4, 7, 4, 10, 6, 7, 6, 9, 9, 8, 6, 5, 5, 5, 5, 6, 14, 7, 9, 7, 5, 1)&ampDone=1"

I need the count of items in the 'amplitude' variable. Everything else in the file should be ignored.

For example, if there are two files in the directory names [url removed, login to view] and [url removed, login to view] and [url removed, login to view] contains ""&faFile=50069.wav&fps=2&scale=100&smoothing=0&dBValues=0&stereo=0&amplitude=(13, 5, 3, 11, 2)&ampDone=1" and [url removed, login to view] contains "&dBValues=0&stereo=0&amplitude=(13, 5, 3, 11)", the output should be:

<table>

<tr>

<td>[url removed, login to view]</td>

<td>5</td>

</tr>

<tr>

<td>[url removed, login to view]</td>

<td>4</td>

</tr>

</table>

Thanks.

-

PHP

Project ID: #1478333

About the project

7 proposals Remote project Active Mar 1, 2012

Awarded to:

ClusterStudio

Job for an hour. Ready to start immediately.

$30 USD in 0 days
(34 Reviews)
6.2

7 freelancers are bidding on average $48 for this job

EfficientDev

Hi there. I'm ready to start right now and provide the script that will read the files and create the two columns table as per your description. More details in PM.

$120 USD in 1 day
(29 Reviews)
5.6
rfedorov

Hello, I'd like to work with you on this project. Accept the bid and the script will be ready in one hour. Please check kindly the private message. Regards, Roman

$40 USD in 0 days
(26 Reviews)
5.5
quatroo

I can do for you this easy job in less that 1 day.

$30 USD in 1 day
(24 Reviews)
4.5
seanboy

Easy. Let me knock it out for you.

$55 USD in 1 day
(13 Reviews)
4.6
Butterfly718

Hello,sir. I can help you. Let's start.

$30 USD in 0 days
(31 Reviews)
4.7
sureshv120

Hello Sir, I have five years of experience in PHP/Shell and perl. Please check PMB for more details.

$30 USD in 2 days
(1 Review)
1.6