0

I want to retain the format of my text when I write it into csv.

Example

First Name John

Age 22

Country Afghanistan

On my example I have my label and its value, I want to retain its style when I write it to csv using PHP. Is there a way to do that? Thanks!

kimbebot
  • 887
  • 5
  • 16
  • 28

1 Answers1

4

csv is plain text seperated by commas ,. There is no styling attached to it. You could all caps the output, or you could use another format that supports text styles.

see - http://en.wikipedia.org/wiki/Comma-separated_values

Sean
  • 12,443
  • 3
  • 29
  • 47
  • The easiest/best solution is to use a `php/excel` library. You can find a great list of them at [stackoverflow.com/questions/3930975/alternative-for-php-excel#3931142](http://stackoverflow.com/questions/3930975/alternative-for-php-excel#3931142) – Sean Nov 28 '12 at 06:27