Shan
04-08-2004, 02:34 PM
I am trying to parse a line in a document.
The line is always 64 characters long.
Always divided into 8 calumbs of data with trailing spaces to fill the remaining 8 characters.
I need to parse the line and store the 8 pieces of information into an database.
I know I can create my own function with seeks, rtrims, etc.
My question is this: is there a built in function in PHP (similar to the SSCANF() function) that will scan through a line and divide it into chunks based on fixed character lengths?
Shan
The line is always 64 characters long.
Always divided into 8 calumbs of data with trailing spaces to fill the remaining 8 characters.
I need to parse the line and store the 8 pieces of information into an database.
I know I can create my own function with seeks, rtrims, etc.
My question is this: is there a built in function in PHP (similar to the SSCANF() function) that will scan through a line and divide it into chunks based on fixed character lengths?
Shan