You are here: Re: fgetcsv delimiters « PHP Programming Language « IT news, forums, messages
Re: fgetcsv delimiters

Posted by John Dunlop on 03/12/06 00:44

Stephen Preston:

> Trouble is, some of my cells already have commas in them, so a tab or
> something else would be better.

No, that doesn't follow. You can hide your delimiter (commas by
default) by double quoting them (double quotes by default, but any
character you set the fourth argument to).

> In the delimiter option of fgcsv(), can you specify a tab and how?

\t or however you insert tabs (got a tab key?).

> My other option (but a bit of a chore) is to copy and paste the xls data
> into word, then replace all the tabs with something like ; that dosn't
> appear in the cells.

Well, I was about to say that TSV has the advantage that it boasts
its own registered MIME type, text/tab-separated-values; but lo and
behold text/csv was registered in October 2005.

http://www.ietf.org/rfc/rfc4180.txt

--
Jock

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация