Xml::tag()
Builds an XML tag
Parameters
Name | Type | Default | Description |
---|---|---|---|
$name * | string |
– | Tag name |
$content | array |string |null |
'' |
Scalar value or array with multiple lines of content or null togenerate a self-closing tag; pass an empty string to generate empty content |
$attr | array |
null |
An associative array with additional attributes for the tag |
$indent | string |
null |
Indentation string, defaults to two spaces or null for output on one line |
$level | int |
Indentation level |
Return type
string