It sounds like you simply need to number format the data to ensure that PHP
does not truncate 

http://php.net/number_format


If excel, or whatever your using to view the csv file, is truncating then
you will need to properly format that cell.


--
Stephen Johnson c | eh
The Lone Coder

http://www.thelonecoder.com
continuing the struggle against bad code

http://www.fortheloveofgeeks.com
I¹m a geek and I¹m OK!
--




> From: Tom Shaw <[EMAIL PROTECTED]>
> Date: Mon, 8 Sep 2008 15:53:58 -0500
> To: PHP list - not junk <php-general@lists.php.net>
> Subject: [PHP] CSV output.
> 
> I'm outputting a bunch of numerical values for a spreadsheet to calculate
> total sales among other things on a client shopping cart. I'm running into
> problems with values that contain zeros after the decimal. If a value is
> 234.55 the value outputs fine to the CSV file but if the value is 234.00
> only 234 shows up. Is there any way to force the zeros into the spreadsheet?
> 
> 
>  
> 
> Thanks
> 
>  
> 
> Tom Shaw
> 
> [EMAIL PROTECTED]
> 



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to