如何将代码附加到变量。
<?php
echo "<ul>\n";
foreach($related as $r) {
if ($r->Count > 0) {
echo "<li>" . "<a>". $r->post_title ."</a>". "\n";
f_tree_av($r->post_id, $level + 1);
echo "</li>";
} elseif ($r->Count==0) {
echo "<li>" . "<a>". $r->post_title ."</a>". "\n";
} else;
}
echo "</ul>\n";
?>