/* Decoded by unphp.net */
s so the order and structure can be manipluated.
$curDepth = 0;
$counter = 0;
// For each of the channels...
foreach ($data["channels"] as $channel):
// If this channel is on the same depth as the last channel, just end the previous channel's - .
if ($channel["depth"] == $curDepth) {
if ($counter > 0) echo "
";
}
// If this channel is deeper than the last channel, start a new .
elseif ($channel["depth"] > $curDepth) {
echo "";
$curDepth = $channel["depth"];
}
// If this channel is shallower than the last channel, end - and
tags as necessary.
elseif ($channel["depth"] < $curDepth) {
echo str_repeat("
", $curDepth - $channel["depth"]), "";
$curDepth = $channel["depth"];
}
// Output a list item for this channel. ?>
-
and
tags as necessary.
echo str_repeat("
", $curDepth), "";
?>