2
可能重复:
How can I only get the alt attribute of the a p tag in PHP?如何让图像url中的ALT?
我有下面的HTML代码:
<img src="test.png" alt="test1" />
<img src="test2.png" alt="test2" />
如何获得alt
-attribute从这些img
标签都有效的价值?任何想法实现一个功能getAlt()
?
最好的方法 - http://stackoverflow.com/questions/3577641/best-way-to-parse-html-with-php – adatapost 2011-12-16 03:59:21