PHP Classes

CSV

Recommend this page to a friend!

      Create CSV  >  All threads  >  CSV  >  (Un) Subscribe thread alerts  
Subject:CSV
Summary:Add quotes around text fields
Messages:2
Author:nlstart
Date:2007-06-29 08:41:54
Update:2007-06-30 08:52:26
 

  1. CSV   Reply   Report abuse  
Picture of nlstart nlstart - 2007-06-29 08:41:55
If a field is a character field it is better to enclose it with quotes in order not to break the CSV.

E.g.
1,Unforunately, this would break my CSV file,1.01,true

should be:
1,"Unforunately, this would break my CSV file",1.01,true

  2. Re: CSV   Reply   Report abuse  
Picture of Ellery Leung Ellery Leung - 2007-06-30 08:52:26 - In reply to message 1 from nlstart
Thanks for your suggestion.

The class has been updated with the 3rd parameters which control whether all the value should be quoted or not.

Thanks again for using. (^_^)