html::attr($name, $value = null)

Generates a single attribute or a list of attributes

  • $name (string)
    mixed string: a single attribute with that name will be generated. array: a list of attributes will be generated. Don't pass a second argument in that case.
  • $value (string)
    if used for a single attribute, pass the content for the attribute here
  • return (string)
    the generated html

Is something missing or incorrect? Edit this page on Github…