label() public static method
Generates a label tag.
public static string label ( $content, $for = null, $options = [] )$content string
Label text. It will NOT be HTML-encoded. Therefore you can pass in HTML code such as an image tag. If this is is coming from end users, you should encode() it to prevent XSS attacks. $for string
The ID of the HTML element that this label is associated with. If this is null, the "for" attribute will not be generated. $options array
The tag options in t