0

我有一个关于$categ从主页上的子页面回显特定的问题。例如,这段代码:

<?php foreach ($categories as $name => $value) { echo $categ[$name]; }  ?> 

回显子页面上的所有类别,例如../library_books/

回声:

category1 "library books1" -> "book1" "book2" "book3",...
category2 "library books2" -> "book1" "book2" "book3",...
category3 "library books3" -> "book1" "book2" "book3",...

我怎样才能回显例如library books2只有 1 个子类别的类别 2,例如:book2在主页上domain.com

谢谢

4

0 回答 0