Click to See Complete Forum and Search --> : Help, need to format a txt file


damon2003
10-23-2003, 08:02 AM
Hi,
I have the results of a query in a text file in this format:

T 1 F CHRISTMAS DINNER 45.00 3
T 10 F CHRISTMAS DAY TURKEY 112.50 3
T 100 F PARTY FOOD 1 45.00 4

How can I change the above text file into the format below??
There are hundreds of lines to this thing, so cant do it manually, thanks a lot

var h=new Array();

h["1"]="3|Christmas Dinner with Turkey|45";
h["2"]="3|Christmas Dinner with Turkey Crown|45";
h["3"]="3|Christmas Drinks|45";

Khalid Ali
10-23-2003, 08:06 AM
I think your best bet will be to do this on server side,when you read the query,just create the required format.