LaravelBook\Laravel4Powerpack\HTML::dl PHP Method

dl() public method

Generate a definition list.
public dl ( array $list, array $attributes = [] ) : string
$list array
$attributes array
return string
    public function dl($list, $attributes = array())
    {
        $html = '';
        if (count($list) == 0) {
            return $html;
        }
        foreach ($list as $term => $description) {
            $html .= '<dt>' . $this->entities($term) . '</dt>';
            $html .= '<dd>' . $this->entities($description) . '</dd>';
        }
        return '<dl' . $this->attributes($attributes) . '>' . $html . '</dl>';
    }