Get, Set and Remove attributes
$value = $e->href;
$e->href = 'my link';
$e->href = null;
if(isset($e->href))
echo 'href exist!';
Magic attributes
$html->load("<div>foo <b>bar</b></div>");
$e = $html->find("div", 0);
echo $e->tag;
echo $e->outertext;
echo $e->innertext;
echo $e->plaintext;
Attribute name |
Description |
$e->tag |
Read or write the tag name of element. |
$e->outertext |
Read or write the outer HTML text of element. |
$e->innertext |
Read or write the inner HTML text of element. |
$e->plaintext |
Read or write the plain text of element. |