Jump to content
php.lv forumi

csv tab delimiter


anonīms

Recommended Posts

   fputcsv($out, array('Vārds', 'Punkti', 'Izpildīts'));
   if($csv_data) {
		foreach($csv_data as $row) {
			$line = array(check_plain($row['name']), $row['points'],$row['added']);
			fputcsv($out, $line,chr(9));
		}
	}

 

kāda velna pēc atverot caur exceli man viss ir vienā čupā? (neatdalas pa tabiem (name,points,added)) + chr(9) ar nepalīdz ;[

 

	header('Content-Encoding: UTF-8');
	header('Content-type: text/csv; charset=UTF-8');
	header('Content-Disposition: attachment; filename="'.date("d-m-Y_H:i") . '.csv'.'"'); 
Edited by anonīms
Link to comment
Share on other sites

yep. jau atkodu un steidzos te iekomentēt 

 

	fputcsv($out, array('Vārds', 'Punkti', 'Izpildīts'),";");
	if($csv_data) {
		foreach($csv_data as $row) {
			$line = array(check_plain($row['name']), $row['points'],$row['added']);
			fputcsv($out, $line,";");
		}
	}
Edited by anonīms
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...