$text = preg_replace("/•/mu", '<br>•', $text);
for ($i = 0; $i < mb_strlen($key, 'UTF-8'); $i++) {
$char = mb_substr($key, $i, 1, 'UTF-8');
if (isset($current_node['isLeaf']))
unset($current_node['isLeaf']);
unset($current_node['isLeaf']);
$current_node = &$current_node['children'][(string)$char];
явно не лучшее решение.