使用PHP和MySQL自定义模板标签

Let's say i'm creating a blog platform where users can edit their template with HTML tags, would it be possible doing something like the following code?

<links>
 <a href="<%LinkUrl%>"><%Link%></a>
 <a href="<%LinkUrl%>"><%Link%></a>
</links>

To manage that, how should I proceed? Is there a easy way to do this? I have looked at Smarty template engine, but that is way too difficult for a user without much experience of programming. Other solutions avaliable for this purpose?

It would be interesting if someone could give me a briefing on how I could create something similiar. Not looking for finished code in any way - just some help getting started.

Try to work yourself into regular expressions. You can achieve what you want with them.

Tutorial

preg_replace() manual