[PHP] Re: PHP to Excel (csv)

2002-10-09 Thread Ivo Stoykov
Thank you for your help. Ivo "Ivo Stoykov" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Hi > > I have following problem. > > Some data retreived from mysql db I need to send to the user as a *.csv > file. Usually I separate fields (usually double quoted) wi

RE: [PHP] Re: PHP to Excel (csv)

2002-10-07 Thread Timothy J Hitchens
: [EMAIL PROTECTED] Subject: [PHP] Re: PHP to Excel (csv) Check out http://www.wotsit.org for the exact csv specifications but here is a snippit that works for me: function csv($value) { if (strstr($value, ",") || strstr($value, "\n") || strstr($value, "\r&qu

[PHP] Re: PHP to Excel (csv)

2002-10-07 Thread Owen Prime
Check out http://www.wotsit.org for the exact csv specifications but here is a snippit that works for me: function csv($value) { if (strstr($value, ",") || strstr($value, "\n") || strstr($value, "\r")) { return "\"" . str_replace("\"", "\"\"", $value) . "\""; } el

[PHP] Re: PHP to Excel (csv)

2002-10-07 Thread @ Edwin
Perhaps, you can take them off then? I think you can use str_replace() to replace them with "". - E "Ivo Stoykov" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Hi > > I have following problem. > > Some data retreived from mysql db I need to send to the user