{php $child_arr = explode(',', $v['arrchildid']);} <li {if isset($catid) && in_array($catid, $child_arr)} class="hover" {/if} ><a href="/search/sou_{$q}/">全站</a></li> <li {if isset($catid) && in_array($catid, $child_arr)} class="hover" {/if}><a href="/search/w_{$q}/">网站</a></li> <li {if isset($catid) && in_array($catid, $child_arr)} class="hover" {/if}><a href="/search/s_1_{$q}/">新闻</a></li> 这样循环不了<li class="hover" > 有大神指点一下吗