php-html-parser
php-html-parser copied to clipboard
[Proposal] Append sibling
It would be great if it was possible to append a sibling tag, like this:
$blocks = $dom->find('.test');
foreach ($blocks as $index => $block)
{
$tag = new Tag('<a>This is a Tag</a>');
$block->after(tag);
}
Great idea, although I would have it be $block->appendAfter(tag) instead of $block->after(tag).