Jump to content

split() function assistance needed


dlebowski

Recommended Posts

list($col1, $col2, $col3, $col4, $col5, $col6, $col7, $col8, $col9, $col10, $col11, $col12, $col13) = split( ",", $line, 13 );
        

 

I need assistance.  I use the above line of code to split up a .csv file into columns.  The problem I am running into is that if the column has a comma in it, it wants to create a new column.  For example, if I have "This is a column, blah" it will break it out into two columns.  One has "This is a column" and the other has "blah".  Does anyone know how to get around this?  Thanks.

 

Link to comment
https://forums.phpfreaks.com/topic/69543-split-function-assistance-needed/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.