I have a large / unorganized text file that is created by a system. Attached are two files. One called beginningfile.txt and endresult.txt. What I would like is organization in this file and displayed on a webpage via PHP. The ENDRESULT is just an example. Whatever is easiest will also be fine. Essentially, instead of searching the text file or printing it and looking for '123456' and '456789' as UNIQUE ID's for the rest of the respective data and manually match them up, I would like for the PHP to search for 123456 or 456789 in this case and put them all together. In one instance on the file it will say 02123456, in another it will say 04123456 and yet another it will only say 123456 ((SECTIONIII) column I, if this piece of the text was in a csv file).
Bottom line: there are three separate pieces of data that should be together, but aren't. (for convenience, I have labeled section I,II,III although the titles don't exist in the real file). I want to get these three separated values for the same UNIQUE ID gathered together somehow. Alternative layouts are welcome. Many thanks!!!
Again, of course ENDRESULT wouldn't be an endresult.txt, rather just HTML on Firefox or other browser.