tag_attributes
— Generate attributes for an HTML tag.
Summary
- tag_attributes($attributes)
Generate attributes for an HTML tag.
- Parameters:
$attributes (
array|string
) – Attributes for the tag. If this is a string, it will assign both ‘name’ and ‘id’ attributes that value for the tag.
- Returns:
string
Usage
Examples
Adds attributes to HTML elements. Used mostly as a helper to other functions.
<form <?php echo tag_attributes($formAttributes); ?>>