推 ns1234: if(in_array($name,$auto_active) and in_array($id..)) ? 08/28 02:43
→ samuel1201: 不太理解 T_T 08/28 03:02
推 ns1234: 把你要自動打開的menu寫成一個array,array('menu1','menu2 08/28 03:11
→ ns1234: if(這個item在是要自動打開的 and in_array($id,$path)) 08/28 03:14
→ ns1234: 就加class="active" 08/28 03:14
→ ns1234: 後面的in_array是你原本的條件 08/28 03:16
→ samuel1201: if (in_array('classID') and in_array($item->id, $p 08/28 03:49
→ samuel1201: $path)) 08/28 03:49
→ samuel1201: 這樣寫對嗎? 把要自動打開的放到 classID ? 08/28 03:50
→ samuel1201: 不好意思我是美術設計 想好久 :p 08/28 03:50