alright, i think the solution to my question is to use REGEX, but my current knowledge of it hinders me to achieve the result that i want.
so basically, how do i make all URL
occurrence in my posts/text entries to wrap inside an <a href>
element when being queried.
when i echo $content;
from a database it will display as:
this is a link http://somerandomsite.com, check it out!
but how can i make the link inside a text to be contained in <a href>
tag when displayed.
id be honest to say that i dont know how to properly write the syntax. but this is what ive come up with.
//get url from content
$link = strstr($content, 'http://');
//insert <a href> for all $link inside $content
//then display $content with all links wrapped in <href>