我想一個正常的鏈接標籤轉換爲圖像標籤,轉換標準的鏈接,圖片鏈接
我將如何轉換這下面,
<a href="images/first.jpg">This is an image.</a>
<a href="images/second.jpg">This is yet another image.</a>
<a href="images/third.jpg">Another image.</a>
進入這個用PHP,
<img src="dir/images/first.jpg">This is an image.
<img src="dir/images/second.jpg">This is yet another image.
<img src="dir/images/third.jpg">Another image.
源中可以有任意數量的鏈接。
謝謝。
inb4使用HTML解析器。 – zneak 2010-03-07 21:49:59