# getElementsByTagName

```php
getElementsByTagName ( string $name [, int $idx = -1 ] ) : object
```

Searches elements by tag name.

| Parameter | Description
| --------- | -----------
| `name`    | Tag name of the element to find.
| `idx`     | Returns the element at the specified index.

Returns the element(s) or null if no match was found.