skip to Main Content

RegExp in PHP – Get multiarray from string

I have a strings with pattern, something like this: (X,1,1,3),(X,1,1,3),(X,@2,@2,@2,@2,@2,(Y,1)) And I need to extract from this One big array, reverse order, and generate new string: (X,(Y,1),@2,@2,@2,@2,@2),(X,3,1,1),(X,3,1,1) And expected array: Array ( [0] => Array( [parent] => (X,1,1,3) [childs] =>…

VIEW QUESTION
Back To Top
Search