Add a link to a URL in a string – PHP

How to add a a tag in a string when it is a url like “http://…”?

Here is a simple solution: