html::tag

Generates an Html tag with optional content and attributes

html::tag($name, $content = null, $attr = array())

Parameters

$name (string)
The name of the tag, i.e. "a"
$content (mixed)
The content if availble. Pass null to generate a self-closing tag, Pass an empty string to generate empty content
$attr (array)
An associative array with additional attributes for the tag

Return values

string
The generated Html