Here's the thing, I need to be able to accept data by text files in the following format:
product_name|productid|image
Stanton SL1600|123212|http://www.com.com/images/1232.jpg
Stanton SL1601|123211|http://www.com.com/images/1231.jpg
But here's the catch, there is actually 8 possible columns and they could be ordered in any order.
I need to read the file and output the following information row by row:
loop {
$record["columnname"] = "column value for that row";
}
Then once the array is populated for each row, I have a function that inserts a row of data like this:
insertrow("talename", $record);
so what it sould really do is this:
//open text file
$datafile = implode('', file($_FILES['File']['tmp_name']));
rowloop {
// build row in an array suing column names as keys
$record["columnname1"] = "column value for that row";
$record["columnname2"] = "column value for that row";
$record["columnname3"] = "column value for that row";
$record["columnname4"] = "column value for that row";
insertrow("talename", $record);
}
I have allready asked this on this forum today in a different context, maybe I am making the problem a little easier for someone else to understand.
If anyone has any idea what I am talking about, please Help!!!!