I have a input field which user enters something. Basically when user enter an url which start with http:// https// or www. i want to store it like <a href="user's words..">user's words...</a>
I'm working with php and mysql. I think replace function is for it. But when I read about it, this function only working on all string as far as I know.
For example:
input: Hi, how are you? Please check this link : http:// www.google.com and enjoy.
output should like below: Hi, how are you? Please check this link : http://www.google.com and enjoy.