Jump to content

is there a way ?


gos1

Recommended Posts

The code hitman gave you will read each line one at a time and then break each line in to an array of items.  Just look at the first item in that array.  That's what echo $line[0]; does.

Sample CSV File
[quote]
L1-Field1,L1-Field2,L1-Field3,L1-Field4,L1-Field5
L2-Field1,L2-Field2,L2-Field3,L2-Field4,L2-Field5
L3-Field1,L3-Field2,L3-Field3,L3-Field4,L3-Field5
[/quote]

If that is your CSV file, hitman's code will display
[quote]
L1-Field1
L2-Field1
L3-Field1
[/quote]
Link to comment
https://forums.phpfreaks.com/topic/30546-is-there-a-way/#findComment-140843
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.