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
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
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
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
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
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
>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
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