How to use php to get inside nested braces?
example:
{{ text1 {{text2 text3 {{text4}} text5}} }}
should output
1- text1 {{text2 text3 {{text4}} text5}}
2- text2 text3 {{text4}} text5
3- text4
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I’ve found the answer i was looking for and put this here so everyone could use it. Its very simple indeed, in one line only:
It will search and replace all {{text}} with whatever you want. You can also use the preg_match_all to get all of them in an array.