Possible Duplicate:
Add new row in MYSQL from Comma Separated text in textbox
Insert comma separated records in table
$words = 'word1,word2,word3';
How do i get this data into following structure:
MySQL table:
id value
1 word1
2 word2
3 word3
What i am thinking of:
$separated = explode(",",$words);
//do some kind of loop
INSERT INTO table (value) VALUES ('$something');
I guess i suck at loops :/
Thanks