Skip to content

Commit

Permalink
Add support for nested ul and ol lists.
Browse files Browse the repository at this point in the history
  • Loading branch information
taylorotwell committed Jul 22, 2011
1 parent 6b50e8b commit e0a8d17
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions system/html.php
Expand Up @@ -195,13 +195,13 @@ public static function ul($list, $attributes = array())
* @param array $attributes
* @return string
*/
private static function list_elements($type, $list, $attributes)
private static function list_elements($type, $list, $attributes = array())
{
$html = '';

foreach ($list as $key => $value)
{
$html .= '<li>'.static::entities($value).'</li>';
$html .= (is_array($value)) ? static::list_elements($type, $value) : '<li>'.static::entities($value).'</li>';
}

return '<'.$type.static::attributes($attributes).'>'.$html.'</'.$type.'>';
Expand Down

0 comments on commit e0a8d17

Please sign in to comment.