I want to find all links in the text like this:
Test text http://hello.world Test text http://google.com/file.jpg Test text https://hell.o.wor.ld/test?qwe=qwe T
{$url[0]} ", $text); } else { // if no urls in the text just return the text echo $text; } ?>
Reference:http://css-tricks.com/snippets/php/find-urls-in-text-make-links/