如何从主页上的子页面回显特定的$ categ

时间:2012-10-10 18:41:05

标签: php echo

我有一个关于在主页上从子页面回显特定$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

由于

0 个答案:

没有答案