php curly braces groups
- by David
is there a function or regex or anything to group items by a { and } tag? so it should group items by the opening tag { and the closing tag }. but be careful, there are also groups inside parent groups like so:
group {
text1
group2 {
text2
}
}
so basically think of it like php, you make an opening tag, you need to close it with a closing tag, curly braces in php's case.
i just need it to like substr() each group into an associative array somehow, except I cant figure it out with the whole, "group inside a parent group".