Skip to content

Commit

Permalink
Merge pull request #100 from jackmcdade/5.1
Browse files Browse the repository at this point in the history
dl() now supports multiple descriptions per term
  • Loading branch information
adamgoose committed Nov 28, 2015
2 parents 292a478 + acb21a9 commit 828da38
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/HtmlBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,13 @@ public function dl(array $list, array $attributes = [])
$html = "<dl{$attributes}>";

foreach ($list as $key => $value) {
$html .= "<dt>$key</dt><dd>$value</dd>";
$value = (array) $value;

$html .= "<dt>$key</dt>";

foreach ($value as $v_key => $v_value) {
$html .= "<dd>$v_value</dd>";
}
}

$html .= '</dl>';
Expand Down

0 comments on commit 828da38

Please sign in to comment.