Hello I can not find a tab to csv converter, any one here now about a php file to convert tab to csv

Recommended Answers

All 5 Replies

You'll probably find all the documentation right here
http://us.php.net/manual/en/function.fputcsv.php

How can I apply this to the file attached

???
Thank you

How can I apply this to the file attached

???
Thank you

Copy this function to your php file if fputcsv() is undefined: http://us.php.net/manual/en/function.fputcsv.php#77866

and then put the following code on the same page:

$contents = file("dtifeed.txt"); //your path/file with read permission
$handle = fopen('file.csv'/*some other path/file with write permission*/, 'w');
foreach($contents as $line)
{
	fputcsv($handle, explode("\t", $line));
}
fclose($handle);

Copy this function to your php file if fputcsv() is undefined: http://us.php.net/manual/en/function.fputcsv.php#77866

and then put the following code on the same page:

$contents = file("dtifeed.txt"); //your path/file with read permission
$handle = fopen('file.csv'/*some other path/file with write permission*/, 'w');
foreach($contents as $line)
{
	fputcsv($handle, explode("\t", $line));
}
fclose($handle);

This worked thatnk you

n:) pr:)blem

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.