Hi,
I have a problem with tab deliminated fputcsv().
I tried it like..
$list=array("adsha,afjahf,asasdf",);
$file = fopen("contacts.csv","a");
foreach ($list as $line)
{
fputcsv($file, split("\t", $line));
}
But it is not working..
Tab deliminated FPUTCSV() in php
Moderator: General Moderators
Re: Tab deliminated FPUTCSV() in php
Where are the tabs? That string looks comma delimited to me....
Also I think split() is deprecated. You should use preg_split() instead.
And how do you mean "not working"?
Also I think split() is deprecated. You should use preg_split() instead.
And how do you mean "not working"?
Re: Tab deliminated FPUTCSV() in php
what should I change for above code ..In order to get tab deliminated outputjackpf wrote:Where are the tabs? That string looks comma delimited to me....
Also I think split() is deprecated. You should use preg_split() instead.
And how do you mean "not working"?
Re: Tab deliminated FPUTCSV() in php
Well, if you want each comma delimited word as a formatted csv line, then $list=array("adsha afjahf asasdf") and use preg_split('/\t/', $list);