So I am trying to figure out how I can an input such as
[url=value]
and turn it into
<a href="value">
Of course, I want to preserve that value. Thanks for the help!
Ultimately I want to be able to feed in any target and replacement, including [email=value]
to <a href="mailto:value">
.
So far I have:
$before = explode($fix['before'],"value");
$after = explode($fix['after'],"value");
preg_replace('/\\'.$before[0].'(.+?)'.'\\'.$before[1].'/', $after[0].'\1'.$after[1], $post);