description ) ), 0, 300 );
//$options['attributes']['alt'] = $text_for_options;
$options['attributes']['title'] = $text_for_options;
$pole[]=Array ( l($term->name, "taxonomy/term/$term->tid", $options), $term->depth, $term->tid );
}
$depth =-1;
foreach ($pole as $list) {
//$depth- глубина предыдущего уровня
//$list[1] - глубина текущего элемента
if ($list[1] == $depth) {
echo "";
next;
}
while ($list[1] != $depth) {
if ($list[1] > $depth) {
$depth++;
echo "\n
";
next;
}
if ($list[1] < $depth) {
$depth--;
echo "\n\n
";
}
}
echo "\n
$list[0]";
$depth=$list[1];
}
//Закрываем все открытые теги до нулевого уровня:
$depth=0;
while ($list[1] != $depth) {
if ($list[1] > $depth) {
$depth++;
echo "\n";
}
}
?>