Hello again (today),
few hours ago I wrote about my string parsing problem. I have read some posts, manuals and I've found the answer -> preg_match_all will do the job. Unfortunatelly I have never use this function... I hope that you will help me.
Currently I'm writing template engine for my application. I wasn't satisfied with Smart Template Engine so I decided to write my own.
In template sources webmaster can write something like this:
- <td><expression="$some_var"></td>
- <td><expression="urlencode($this_url)"></td>
- <td><expression="concat('some simple tex', $some_var)"></td>
- <td><expression="concat('some test', urlencode($this_url))"></td>
- <td><expression="http://{$erer}/eokoer.html"></td>
And my problem is how to parse expression value to get info about vars, functions etc... All functions have the same structure "name(...)", variables can be like this "$some_var" or "{$some_var}";
I will be appreciated for any help.
Marek