/** * Returns an opening HTML tag, (possibly) with attributes. * * @param string $tag The HTML tag (default: 'div') * @param array $attributes The as an assoc. array. (optional) * @return string The opening HTML tag string. */ public static function tagOpen($tag, $attributes = array()) { return \Phpf\Html\Element::open($tag, $attributes); }
/** * 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; }