div#main div.halfgradient ul#linklist p.question a {margin-left: 20px}'; $headSection = $p->select('item', 'id = 46'); $faq = $p->select('listAll', 'l.parent = 46'); foreach ($faq as $k => $v) { $faq[$k]['questions'] = $p->select('listAll', "l.parent = " . $v['id']); } reset($faq); if(!is_numeric($id)) { $id = $faq[0]['questions'][0]['id']; $activeCat = 0; } else { foreach ($faq as $catKey => $cat) { if(is_array($cat)) { foreach ($cat['questions'] as $vv) { if($id == $vv['id']) $activeCat = $catKey; } } } } ?>

>