【发布时间】:2014-04-06 03:15:08
【问题描述】:
我有字符串:
$string1 = 'Hi John. Please, go to my website http://www.google.com :)';
$string2 = 'See this :P www.imgurl.com/abcd.jpg';
如何将此字符串转换为:
$string1 = 'Hi John. Please, go to my website <a href="http://www.google.com">http://www.google.com</a> :)';
$string2 = 'See this :P <img src="http://www.imgurl.com/abcd.jpg" alt ="" />';
我不知道;(
【问题讨论】: