-----Original Message-----
From: Eric Wood [mailto:[EMAIL PROTECTED] 
Sent: Monday, October 25, 2004 7:53 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Need function to process tab delimited file using
associative array


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

>>> Following two functions can be usefull in making such algo
File()
Explode();
Read about them

Zareef Ahmed
>>> 
-- 

------------------------------------------------------------------------
--
Zareef Ahmed :: A PHP develoepr in Delhi ( India )
Homepage :: http://www.zasaifi.com

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.782 / Virus Database: 528 - Release Date: 10/22/2004
 

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

Reply via email to