Skip to content

Kirby 3.9.8

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
$props * array|string The source array or tag content (used internally)
$name string 'root' The name of the root element
$head bool true Include the XML declaration head or not
$indent string ' ' Indentation string, defaults to two spaces
$level int 0 The indentation level (used internally)

Return type

string

Parent class

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