CaseyBlackburn
Gawd
- Joined
- Dec 10, 2006
- Messages
- 540
I have a string that I need to replace part of.
For example I have:
$string = "A link will go [link:http://google.com]Here[/link] and some more text here";
I want to change [link:%url%]%text%[/link] to <a href="%url%">%text%</a> no matter what the url and text are. How can I do this? I am unsure how to do it with a str_replace or preg_replace
For example I have:
$string = "A link will go [link:http://google.com]Here[/link] and some more text here";
I want to change [link:%url%]%text%[/link] to <a href="%url%">%text%</a> no matter what the url and text are. How can I do this? I am unsure how to do it with a str_replace or preg_replace