Gurus,
I have a flat file where each record looks like the record below: Each record is 256 characters
625012C0010010070897111605 NIKE AIR FORCE ONE 7871077 15OZ 0001000000319000000002085000001HITOP 000000010007870 100000101000000000 00120001004 001500000703270327 000 00250200O
I want strip out diffrent sections of the record and write them to another file.
I have a key/legend which states the characters 1-7 is the header; characteres 8-12 us the batch# and so on all the way to 256.
How can I go thru each record and do something like this;
Grab the data between chars 14-26, 80-83 and 87-92 then right it to a file with headers like
Category Price UPC
14-26 80-83 87-92
14-26 80-83 87-92
I know PHP has the substr function but I'm not sure how to implement in this case.
I would appreciate any comments or thoughts.![[bigcheeks] [bigcheeks] [bigcheeks]](/data/assets/smilies/bigcheeks.gif)
I have a flat file where each record looks like the record below: Each record is 256 characters
625012C0010010070897111605 NIKE AIR FORCE ONE 7871077 15OZ 0001000000319000000002085000001HITOP 000000010007870 100000101000000000 00120001004 001500000703270327 000 00250200O
I want strip out diffrent sections of the record and write them to another file.
I have a key/legend which states the characters 1-7 is the header; characteres 8-12 us the batch# and so on all the way to 256.
How can I go thru each record and do something like this;
Grab the data between chars 14-26, 80-83 and 87-92 then right it to a file with headers like
Category Price UPC
14-26 80-83 87-92
14-26 80-83 87-92
I know PHP has the substr function but I'm not sure how to implement in this case.
I would appreciate any comments or thoughts.
![[bigcheeks] [bigcheeks] [bigcheeks]](/data/assets/smilies/bigcheeks.gif)