0
我有一個字符串:PHP - 更改文字URL真實URL字符串
$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 ="" />';
我不知道;(