Re: fwrite csv merged cells



Pasquale wrote:
How can I fwrite to a csv file with the row having merged cells and centered text? For example, a section title:

            Title
col1    col2    col3    col4    col5    col6


Correct me if I'm wrong, but isn't the point of a CSV file that the *Variables* are *Separated* by *Commas*? It's purely a data-holdig format, not a presentation format. Why would you want to centre things or merge cells?


But anwyay, that's just manipulating strings in PHP. Nothing particularly complicated about that! Or is there something that I'm missing about what you want to do?

e.g.

	$str = $var1 . "  " . $var2 . "  " . $var3;

If you want to align things nicely, use str_pad().

And centering things is just appropriate use of strlen().



--
Oli
.