You are here: Re: CSV file into an array « PHP Programming Language « IT news, forums, messages
Re: CSV file into an array

Posted by Andy Jeffries on 03/09/06 15:25

On Thu, 09 Mar 2006 10:07:07 +0100, Erwin Moller wrote:
> First get the upload up and running, then start with the handling of the
> file.
> fgetcvs() is a nice helperfunction, but you can do it by hand too. Really,
> just try it.

But if you try to handle it yourself don't fall in to the pitfall of just
exploding the string on "," as some CSV files may have commas within
columns, e.g.:

Name,Age
John Smith,21
"Doe, Jane", 21

Cheers,


Andy

--
Andy Jeffries MBCS CITP ZCE | gPHPEdit Lead Developer
http://www.gphpedit.org | PHP editor for Gnome 2
http://www.andyjeffries.co.uk | Personal site and photos

 

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

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