parsing a csv file

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
cali_dotcom
Forum Commoner
Posts: 49
Joined: Fri Aug 22, 2008 7:28 pm
Location: Rancho Cucamonga, CA

parsing a csv file

Post by cali_dotcom »

hi, im not such a php expert and i want to parse a csv file located at http://www.totalbeauty.com/resource/lists. does anyone know how i can do this, what to watch out for, the best way to do this and just general tips for parsing files.
thanks..
User avatar
Darhazer
DevNet Resident
Posts: 1011
Joined: Thu May 14, 2009 3:00 pm
Location: HellCity, Bulgaria

Re: parsing a csv file

Post by Darhazer »

Use the fgetcsv() function
cali_dotcom
Forum Commoner
Posts: 49
Joined: Fri Aug 22, 2008 7:28 pm
Location: Rancho Cucamonga, CA

Re: parsing a csv file

Post by cali_dotcom »

does anyone know how to get the max lenght of any line in the file? the fgetcsv() requires a lenght argument that should ne greater that the longest line in the file.
maheshchari
Forum Newbie
Posts: 3
Joined: Tue Jul 21, 2009 11:34 pm
Location: hyd

Re: parsing a csv file

Post by maheshchari »

use maxfilesize()
Post Reply