View file core/libs/htmlParser/manual/docs/api/simple_html_dom/getElementsById.md

File size: 334B
# getElementsById

```php
getElementsById ( string $id [, int $idx = null ] ) : object
```

Searches elements by id.

| Parameter | Description
| --------- | -----------
| `id`      | ID of the element to find.
| `idx`     | Returns the element at the specified index if defined.

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