Hi guys
I tried to Google this but unfortunately I couldn't find any thing,
Can you please let me know how I can populate a drop-down list from a csv file using php?

For example let say I have a csv file(league.csv) like this:
Man City,9,25
Man Utd,9,20
Chelsea,9,19
Newcastle,9,19
Tottenham,8,16
Liverpool,9,15
Arsenal,9,13
Norwich City,9,12
Stoke City,9,12
QPR,9,12
Aston Villa,9,11
WBA,9,11
Everton,8,10
Sunderland,9,9
Swansea City,9,9
Wolves,9,8
Fulham,9,7
Bolton,9,6
Wigan Athletic,9,5
Blackburn,9,5

How I can populate them in dropdown list?

Thanks for you time

What should be in the dropdown ? Just the names ?

Hi Pritaeas,

I would like to add all items to drop-down list ,I mean to do exactly what we do on populating cells when creating table from csv file,however it would be great if you can explain me how I can just populate the names, I think I can figure out how to create a loop to generate that part

Regards

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.