Hi all is it possible to explode to a third parameter?
[php]if(isset($_GET[‘nav’])) {
$currpage = $_GET[‘nav’];
$currpage = explode(’-’,$currpage);
$page = $currpage[0];
$currpagei = implode(’,’,$currpage);
}[/php]
I am trying to set up a third level to my catalog and when I try
$currpage = explode(’-’, $currpage, ‘-’, $currpage)
It doesn’t work. I am calling from mysql,
I have an $row[‘id’] number that sets the first level if $row[‘nosubs’] is set to 0 -
it displays the sub group making the $row[‘sub’] = $page and then $row[‘id’] becomes the sublevel setting.
But how can i set a third level if I need to reference the $row[‘id’] && $row[‘sub’] for stacking order purchases… I tried setting a $row[sub_of] but it never moves down the list. It only stays on the second level???
[php] if($row[‘id’] == $currpage[0]) {
if($CAPP == true && $access != true) {
$subs = mysql_query("SELECT name, id, icon, subofsub, nosubs, sub_of FROM directoryTest WHERE sub = '$page' AND published = '1' AND catalog='$catalog' ORDER BY sort_order,id");
} else {
$subs = mysql_query("SELECT name, id, icon, subofsub, nosubs, sub_of FROM directoryTest WHERE sub = '$page' AND catalog='$catalog' ORDER BY sort_order,id");
}
while($subcats = mysql_fetch_assoc($subs)) {
if($subcats['id'] == $currpage[1]) {
$class = 'catalog_btn catalog_active';
} else {
$class = 'catalog_btn catalog_sub2';
}
$bb .= '<li><span class="'.$class.'"><a href="wallcovering-catalog2Test.php?nav=' . $page . '-' . $subcats['id'] . '">' . $subcats['name'] . '</a></span></li>';
}
}[/php]