Simple HTML DOM wildcard in attribute
[attribute] - Matches elements that have the specified attribute.
[!attribute] - Matches elements that don't have the specified attribute.
[attribute=value] - Matches elements that have the specified attribute with a certain value.
[attribute!=value] - Matches elements that don't have the specified attribute with a certain value.
[attribute^=value] - Matches elements that have the specified attribute and it starts with a certain value.
[attribute$=value] - Matches elements that have the specified attribute and it ends with a certain value.
[attribute*=value] - Matches elements that have the specified attribute and it contains a certain value.
# ex.
$html->find("div[class*=col]", 0)->outertext
출처 : https://stackoverflow.com/questions/13525124/simple-html-dom-wildcard-in-attribute/13529781
'IT > PHP' 카테고리의 다른 글
[CRAWL] Simple Html Dom Parser 에서 자식노드 가져오기 (0) | 2017.07.17 |
---|---|
php mongo driver 설치하기 (0) | 2016.08.16 |
한글, 영문, 숫자만 남기기 (0) | 2016.08.10 |
메모리 부족 현상 (allowed memory size of 134217728 bytes..) (0) | 2016.07.11 |
[[ 로그 ]] php에서 간단히 로그 찍기 (0) | 2016.04.28 |