function featuredCats($cat_id, $featured = 1, $option) { global $mainframe; $database =& JFactory::getDBO(); $row = new mtCats($database); if (count($cat_id)) { foreach ($cat_id as $cid) { $row->setFeaturedCat($featured, $cid); } } $row->load($cid); $mainframe->redirect("index2.php?option={$option}&task=listcats&cat_id=" . $row->getParent()); }