Re: Converting tab delimited file to CSV

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

 




Back to my 'original' problem/question, if I '$f = fopen("$file",
"r")' and 'while ($data = fgets($f))' on the above first format and do
a $data = str_replace("\t",",",$data); the resulting file looks like
the second example above when opened into Textpad but will not open
into separate columns when opened with Excel.

Look up http://www.php.net/fgetcsv

and pass "\t" as the field separator.

--
Postgresql & php tutorials
http://www.designmagick.com/

--
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