我想要:
Here is link: http://google.com
And http://example.com inside.
And another one at the very end: http://test.net
成为:
似乎是一项微不足道的任务,但我找不到一个可行的PHP函数。你有什么想法吗?
Here is link: <a href="http://google.com">http://google.com</a> And <a href="http://example.com">http://example.com</a> inside. And another one at the very end: <a href="http://test.net">http://test.net</a>
看起来很简单的任务,但我找不到一个可用的PHP函数。你有什么想法吗?
function make_links_clickable($text){ // ??? } $text = 'Here is link: http://google.com And http://example.com inside. And another one at the very end: http://test.net'; echo make_links_clickable($text);
!
? - Marco Demaio(https://www.sample.com/request)
。函数将包含末尾的 ")" 和 ".",并且看起来像这样<a href="https://www.sample.com/request).">https://www.sample.com/request).</a>
。 - c.k