Need function to process tab delimited file using associative array

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Does anyone have a function stored away that can selectively let me trim out
only the columns *by name* I need from a delimited text file?


For Example:

FName<tab>LName<tab>Phone
John<tab>Smith<tab>3433335335
James<tab>Smith<tab>2345223533
Judy<tab>Smith<tab>5474574544


The first line wouldmake the associative array list names from the title
row, and rows 2 onward are the data.  So that I can:

read row 1 into array
print 'FName','LName'
for each row
print_r('FName')."\t".print_r('Phone').'\n';
next row

This would allow me to ignore all the other colums I don't need and just
save the ones I do need.

Thanks,
-Eric Wood

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux