From b5d6fdedb697cd910a123b10f84d24be5ca0ce51 Mon Sep 17 00:00:00 2001 From: Jack McDade Date: Fri, 23 Oct 2015 17:45:01 -0400 Subject: [PATCH 1/2] dl() now supports multiple descriptions per term --- src/HtmlBuilder.php | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/HtmlBuilder.php b/src/HtmlBuilder.php index 9e916f0b..1e359f08 100755 --- a/src/HtmlBuilder.php +++ b/src/HtmlBuilder.php @@ -293,8 +293,16 @@ public function dl(array $list, array $attributes = []) $html = ""; - foreach ($list as $key => $value) { - $html .= "
$key
$value
"; + foreach ($list as $key => $value) + { + $value = (array) $value; + + $html .= "
$key
"; + + foreach ($value as $v_key => $v_value) + { + $html .= "
$v_value
"; + } } $html .= ''; From acb21a9364695df6557f7d86cb0aaf3b5d8bc859 Mon Sep 17 00:00:00 2001 From: Jack McDade Date: Fri, 23 Oct 2015 17:47:44 -0400 Subject: [PATCH 2/2] correct code formatting --- src/HtmlBuilder.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/HtmlBuilder.php b/src/HtmlBuilder.php index 1e359f08..14c26969 100755 --- a/src/HtmlBuilder.php +++ b/src/HtmlBuilder.php @@ -293,14 +293,12 @@ public function dl(array $list, array $attributes = []) $html = ""; - foreach ($list as $key => $value) - { + foreach ($list as $key => $value) { $value = (array) $value; $html .= "
$key
"; - foreach ($value as $v_key => $v_value) - { + foreach ($value as $v_key => $v_value) { $html .= "
$v_value
"; } }