| 1 |
--- |
| 2 |
title: str_get_html |
| 3 |
--- |
| 4 |
|
| 5 |
# str_get_html |
| 6 |
|
| 7 |
```php |
| 8 |
str_get_html ( string $str [, bool $lowercase = true [, bool $forceTagsClosed = true [, string $target_charset = DEFAULT_TARGET_CHARSET [, bool $stripRN = true [, string $defaultBRText = DEFAULT_BR_TEXT [, string $defaultSpanText = DEFAULT_SPAN_TEXT ]]]]]] ) |
| 9 |
``` |
| 10 |
|
| 11 |
Parses the provided string and returns the DOM object. |
| 12 |
|
| 13 |
| Parameter | Description |
| 14 |
| --------- | ----------- |
| 15 |
| `str` | The HTML document string. |
| 16 |
| `lowercase` | Forces lowercase matching of tags if enabled. This is very useful when loading documents with mixed naming conventions. |
| 17 |
| `forceTagsClosed` | Obsolete. This parameter is no longer used by the parser. |
| 18 |
| `target_charset` | Defines the target charset when returning text from the document. |
| 19 |
| `stripRN` | If enabled, removes newlines before parsing the document. |
| 20 |
| `defaultBRText` | Defines the default text to return for `<br>` elements. |
| 21 |
| `defaultSpanText` | Defines the default text to return for `<span>` elements. |
| 22 |
|