\n";
foreach ($list as $item)
{
if (is_array($item))
{
$out .= _list($type, $item, '', $depth+4);
}
else
{
$out .= str_repeat(" ", $depth + 2);
$out .= "
".$item."\n";
}
}
$out .= str_repeat(" ", $depth);
$out .= "".$type.">\n";
return $out;
}
// ------------------------------------------------------------------------
/**
* Generates the attribute string
*
* @access private
* @param mixed
* @return string
*/
function _set_attributes($attributes)
{
if (is_string($attributes))
{
return $attributes;
}
$atts = '';
foreach ($attributes as $key => $val)
{
$atts .= ' ' . $key . '="' . $val . '"';
}
return $atts;
}
?>