Skip to content

Kirby 6.0.0

Html::create()

Creates an XML string from an array

Html::create(array|string $props, string $name = 'root', bool $head = true, string $indent = '  ', int $level = 0): string

Parameters

Name Type Default Description
$propsrequired arrayorstring no default value The source array or tag content (used internally)
$name string 'root' Name of the root element
$head bool true Whether to include the XML declaration head
$indent string ' ' Indentation string
$level int 0 Indentation level (used internally)

Return type

string

Parent class

Kirby\Cms\Html inherited from Kirby\Toolkit\Xml