-
URL Replace
Hi,
Im tring to wrap a url in code blocks using the replace method. This is the method im using currently:
Code:
$replace = "Replace text here";
$message = preg_replace("#<a href=(.*?)</a>#ims", "$replace", $message);
But what I want now, is to add [code] block on either end and not replace the actual url.
Hope you knwo what I mean lol
-
Re: URL Replace
You want to replace the <a href> tags with [code] tags?
Or you want to wrap [code] tags around the actual URL located within the href attribute?