Posted by Ciaran on 08/08/06 12:58
monomaniac21 wrote:
> hi all i want to replace all entries of beginning with 'www.' and
> ending with ' ' with a hyperlink to that substring such as:
>
> www.google.com := <a href="www.google.com">www.google.com</>
>
> can anyone tell me the easiest way to do this?
You'll want to put an 'http://' in the href attribute, too.
The best way to do this is to use preg_replace, see the manual at
http://php.net/preg_replace.
-Ciaran
[Back to original message]
|