[thelist] Reading a tab delimited file with php

CDitty mail at redhotsweeps.com
Mon Aug 19 21:55:01 CDT 2002


Darn it.... I tried that and it didn't work.  I just tried it again and it
works.  Maybe it's time to log off.  :)

Thanks

Chris

At 09:49 PM 8/19/2002, you wrote:
>CDitty wrote:
>
>>Does anyone have any code examples on how to read and handle a tab
>>delimited using PHP?  I can a comma delimited one, but I can't get the
>>tab
>>delimited to read right.
>>
>>Anyone?
>>
>>Chris
>fgetcsv will parse any incoming line of data into an array based on
>whatever
>delimeter you ask it to.  \t = tab
>
>$f = fopen("file","r");
>while($array = fgetcsv($f,5000,"\t")) {
>// do something with the $array array
>}
>fclose($f);
>
>
>Michael Kimsal
>http://www.logicreate.com/
>734-480-9961
>
>--
>For unsubscribe and other options, including
>the Tip Harvester and archive of thelist go to:
>http://lists.evolt.org Workers of the Web, evolt !




More information about the thelist mailing list