Re: [PHP-DEV] Function Request: csv_explode()

2001-12-06 Thread Zak Greant
On December 5, 2001 01:29 am, Stig S. Bakken wrote: > Splitting a CSV string into an array could be done like this too: > > $fields = explode('","', trim($string, '"')); Hey Stig, I don't think that it is quite that simple. :) The sample code will break for unquoted values and weird

Re: [PHP-DEV] Function Request: csv_explode()

2001-12-05 Thread Edin Kadribasic
On Wed, 5 Dec 2001, Stig S. Bakken wrote: > Splitting a CSV string into an array could be done like this too: > > $fields = explode('","', trim($string, '"')); I've had problems with CSV files exported from Excel that does not quote all fields, escapes double quotes with double quotes and puts

Re: [PHP-DEV] Function Request: csv_explode()

2001-12-05 Thread Stig S. Bakken
Splitting a CSV string into an array could be done like this too: $fields = explode('","', trim($string, '"')); - Stig Justin Plock wrote: > > I guess this would be the correct list to post this on, but I have an idea > for a function that I think would be very handy to users having to deal w

[PHP-DEV] Function Request: csv_explode()

2001-11-29 Thread Justin Plock
I guess this would be the correct list to post this on, but I have an idea for a function that I think would be very handy to users having to deal with CSV data. Basically, I've had to write a version of the explode() function, but have it pay attention to values that are wrapped in another charac

Re: [PHP-DEV] Function request

2001-02-12 Thread Thomas Deliduka
You're right. I was thinking only that a compiled solution would be faster and more efficient than any function I would write. I do agree though, I (kinda) do that now. On 2/12/01 3:30 AM this was written: > On Mon, Feb 12, 2001 at 09:23:36AM +0100, Marc Boeren wrote: > >>> I think this would

Re: [PHP-DEV] Function request

2001-02-12 Thread Matt McClanahan
On Mon, Feb 12, 2001 at 09:23:36AM +0100, Marc Boeren wrote: > >I think this would be nice. To be able to pull a multi-dimentional array > >from a mysql result. > > I'm working on a database abstraction module that does exactly this, and > should support every database module that is loaded into

RE: [PHP-DEV] Function request

2001-02-12 Thread Marc Boeren
>I think this would be nice. To be able to pull a multi-dimentional array >from a mysql result. I'm working on a database abstraction module that does exactly this, and should support every database module that is loaded into php. I've already got it doing what you describe, only I return an obj

[PHP-DEV] Function request

2001-02-09 Thread Thomas Deliduka
I think this would be nice. To be able to pull a multi-dimentional array from a mysql result. For instance, if I do this: Select field1,field2 from mytable Calling something like: $alldata = mysql_fetch_all($dbpointer) Would give me: $alldata["field1"] as an array with values, i.e.: $alldata