0
に示すべきであるが、それは私が最初にのみ親タグをしたい拡張され、ホバー上の次のレベルを示すべきであるので、垂直マルチレベルのメニュー、次のレベルは、この画像は縦メニューを示しているホバー
function display_children($parent, $level, $categoryModel) {
$result = $categoryModel->get_category($parent);
echo "<ul>";
foreach ($result as $row) :
if ($row['Count'] > 0) {
echo "<li><a href='" . base_url() . "/index.php/advertisement/category/" . $row['category_id'] . "'>" . $row['category_name'] . "</a>";
display_children($row['category_id'], $level + 1, $categoryModel);
echo "</li>";
} elseif ($row['Count'] == 0) {
echo "<li><a href='" . base_url() . "/index.php/advertisement/category/" . $row['category_id'] . "'>" . $row['category_name'] . "</a></li>";
}
else;
endforeach;
echo "</ul>";
}
にこれがあります私のコードは、私はCSSが必要です。私が混乱している理由は再帰的な論理です。私は多くのCSSを見つけましたが、水平メニューリストを持っています。私は垂直メニューリストが必要です。ここで
おかげで、それは働きました! –