Skip to content

TemplateTag::getElementsByTagName

James Cobban edited this page Dec 20, 2019 · 5 revisions

$tag->getElementsByTagName($tagname)

Up: class TemplateTag

This method searches the children of the current tag and returns an array of instances of class TemplateTag for which the tag name matches the parameter, ignoring case. For example:

$h1s	= $template->getDocument()->getElementsByTagName('h1');

returns an array containing all of the <h1> tags in the document.

Next: $tag[$key]

Clone this wiki locally