/** * Returns an HTML tag with given content. * * @param string $tag The HTML tag (default: 'div') * @param array $attributes The as an assoc. array. (optional) * @param string $content The content to place inside the tag. * @return string The HTML tag wrapped around the given content. */ public static function tag($tag, $attributes = array(), $content = '') { return \Phpf\Html\Element::tag($tag, $attributes, $content); }
/** * Returns a "<ul>" HTML element. */ function html_ul(array $items, $ul_attrs = array(), $li_attrs = array()) { $s = \Phpf\Html\Element::open('ul', $ul_attrs); foreach ($items as $item) { $s .= \Phpf\Html\Element::open('li', $li_attrs) . $item['text'] . '</li>'; } $s .= '</ul>'; return $s; }