Hey all. Ive been wrestling with this for about 2 hours now, but i just cant do it, so im giving up and hoping someone can help me..
As part of a content management system, i want the user to enter in hyperlinks in a simpler way. the syntax i want to use is this...
[link="http://www.website.com" name="Click here for my site"]
which of course needs to be formatted so it reads:
<a href="http://www.website.com">Click here for my site</a>
Ive tried a bunch of stuff using ereg() and str_replace() and a few other things but i just cant get it to work. I managed to get it if there is only one link in teh text, but it goes wrong if someone wants to use more than one link. Anyone help?
Thanks.