Merge pull request #698 from bencorlett/html-lists

Adding support for values in nested lists generated in the HTML class.
This commit is contained in:
Taylor Otwell
2012-05-30 06:58:19 -07:00

View File

@@ -314,10 +314,17 @@ class HTML {
// produce a nested list within the list being built. Of course, nested // produce a nested list within the list being built. Of course, nested
// lists may exist within nested lists, etc. // lists may exist within nested lists, etc.
if (is_array($value)) if (is_array($value))
{
if (is_int($key))
{ {
$html .= static::listing($type, $value); $html .= static::listing($type, $value);
} }
else else
{
$html .= '<li>'.$key.static::listing($type, $value).'</li>';
}
}
else
{ {
$html .= '<li>'.static::entities($value).'</li>'; $html .= '<li>'.static::entities($value).'</li>';
} }