0) { asort($sorted_nodes, SORT_NUMERIC); $sorted_nodes = array_reverse($sorted_nodes, true); $sorted_nodes = array_slice($sorted_nodes, 0, 100, true); $return = ''; $show = 1; # Only show the first 5 results. foreach ($sorted_nodes as $node_to_return => $count) { $return .= '
5) { $return .= 'style="display:none;"'; } $return .= '>' . escape($node_to_return) . " ($count)
"; $show++; } if ($total_nodes_count > 100) { $return .= ''; } echo $return; } exit();