Hi. I have a php file that parse a txt database well when the database block have equal number of characters per line. Recently, I was given a 1 million line database block that has 488 characters on most of the lines, but 508 characters on others. My current php parser file would pick up the extra characters from longer lines thus screwing up the parsed data. How do I (1) pad 20 white spaces to lines with 488 characters; or (2) strip 20 characters at the end of the line; or (3) tell my parser not to read any character on the same line beyond 488?
The attached test.txt is a small section of the database, and the testOut.txt reflected the output correctly until it hits the line with longer characters.