sbrinley Posted May 20, 2009 Share Posted May 20, 2009 I am trying to take a list of data with two columns and separate it out into a structured table. Here is a sample list of the data Parent Child D61120901GAT R61120901GAT R61120901GAT R61120801GAT R61120801GAT R61120801GAA R61120801GAA R61120701GAT R61120701GAT R61120601GAT R61120601GAT R61120501GAT R61120501GAT R61120003GAT This is the list I want to turn into this D61120901GAT R61120901GAT R61120801GAT R61120801GAA R61120701GAT R61120601GAT R61120501GAT R61120003GAT The parent might have up to 10 children deep in total. Also the parent might have two or more direct children. for example: D61120901GAT R61120901GAT R61120801GAT R61121901GAT R61121801GAT Also even though the numbers seem to go into order here they don't in every part. A typical list size is about 20k lines long. I've tried a few different while loops without success. I fear I might be over complicating it or not looping correctly. If anyone has some ideas or a solutions I would appreciate it! Quote Link to comment https://forums.phpfreaks.com/topic/158977-embedded-while-loop/ Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.