I have a large .txt file (standarized from supplyers) that looks like this (each row have the exact same width and some rows have no space at all..):
1665730AUTOMAT S204M-C 1,6 0090000STK.1618
1665731AUTOMAT S204M-C 10 0075000STK.1618
1665732AUTOMAT S204M-C 13 0075000STK.1618
1034811PR 500V 2X2,5/2,5 MM2 0003550MTR.1007
I want to feed these rows into the table columns that i have created - itemno,description,price,pk,code
where:
1665730AUTOMAT S204M-C 1,6 0090000STK.1618
each color represent the different columns datas as listed above
- with this code i can print one row separated the way i want:
$itemno=substr($linje,0,7);
$description=substr($linje,7,27);
$price=substr($linje,34,11);
$pk =substr($linje,41,4);
$code =substr($linje,45,4);
- but i have no idea on how to put each rows datas into the mysql table columns, can anyone give me a solution?