我有一个关于在主页上从子页面回显特定$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",...
我如何回应示例category2 library books2
,只有1个子类别,例如:主页book2
上的domain.com
由于