Jump to content

Manipulate form text data copied from excel to be placed into an array


dammyg

Recommended Posts

Hi, first time posting here, I don't know much about php but know some basics, I am trying to get data copied from excel to be split up into an array, If i copy data from excel each column is seperated by tabs and each row is seperated by being placed on a new row, if i enter this into a textarea box in a form i wish for each row to be recorded as a seperate person and each column as a different value for that person.

 

example:

 

customer1  5  1st

customer2  7  2nd

customer3  3  1st

 

Any help will be much appreciated.

Thank You

Check out this post I made a while back. It contains 2 "pages" of code to take a csv file and flip it around to create an associative array that you can do with what you will. I use it to upload a csv file, extract the data and then insert into the db.

 

http://www.phpfreaks.com/forums/index.php/topic,156812.0.html

 

Any questions with it, lemme know.

 

Nate

  • 2 weeks later...

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.