I'm trying to write a function in php where I want to replace all occurences of "www." with "<http://www>.".

```
$text = preg_replace("www\.", "http://www.", $data);

```

I've tried using this code but I do not want the string "<http://www>." to be turned into "<http://http://www>.".

Any suggestions?