You are here: Re: Scrubbing MySQL Values and CSVtoArray() « PHP Programming Language « IT news, forums, messages
Re: Scrubbing MySQL Values and CSVtoArray()

Posted by Rik on 08/17/07 16:37

On Fri, 17 Aug 2007 18:13:51 +0200, Michael Fesser <netizen@gmx.de> wrot=
e:

> .oO(Rik)
>
>> On Fri, 17 Aug 2007 03:00:50 +0200, Rik <luiheidsgoeroe@hotmail.com> =
=

>> wrote:
>>>
>>> Well, there's one in the making or something:
>>> <http://nl3.php.net/manual/en/function.str-getcsv.php>, it's not in =
my
>>> PHP though.
>
> It's already in CVS (since 8 months or so), but obviously not in the
> current branches. One could use function_exists() to check for it and
> implement a custom str-getcsv() function if necessary, using one of th=
e
> ways described below.
>
>>> You could define a stream to a variable to get fgetcsv() to work for=

>>> you, might be some overkill.
>
> The manual for stream_wrapper_register() contains a little example cla=
ss
> "VariableStream" to access global variables. This could be useful here=

> (should even work with PHP 4).


Would be, allthough making the variable a global just for that is about =
as =

ugly as using php://memory

>> function parseCSV($str, $delimiter =3D ',', $enclosure =3D '"', $len =
=3D 0)
>> {
>> <SNIP using 'php://memory');
>> }
> Clever. Ugly, but clever. ;)

Indeed :P
-- =

Rik Wasmus

 

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

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