I have been trying and trying but can't seem to get my regular expression to work like I want it too
I'm working on a template system for my forum and having the ability to put conditional statements within the template in the following format:
<if condition="$a == $b">
...
<else>
...
</if>
My problem is with the code that I have right now (which is extremely messy), I can't put one inside of another. I got to a point where I really need to do this for my forum now. Since I had recently learned the basics of regular expressions and have messed around with them for a bit I decided to try it that way and scrap what I had before.
This is what I have right now:
Of course the <else> and </if> were easy, just a simple str_replace, but the first one is what I'm having a problem with. I have a decent understanding of regular expressions but have tried for a couple hours with no success.
If anyone could help me out with this I'd appreciate it greatly.
