Hello, anyone can help me to add a background color to my div, for example, if an id of 2 is found (pls see my code)
$idMenuParent = $resGetInfoMenu[0]['IDMENUPARENT'];
//if the menu has a parent
if($idMenuParent) {
// get menu info
$infoMenuParent = cGetInfoMenu($idMenuParent);
//fetch all child menus
$secondMenus = cGetMenus($_SESSION['IDLANG'], 1, $idMenuParent);
if(!empty($secondMenus)) {
?>
<div id="secondary-menu-main">
<div id="secondary-menu-items">
<?php
foreach($secondMenus as $secondMenu) {
//get child menu info
$sousItem = cGetItemMenu($_SESSION['IDLANG'], $secondMenu['IDMENU']);
if($idMenuSelected == $secondMenu['IDMENU']) {
$selected = "-activated";
}
else {
$selected = "";
}
where i want to check the value of the variable $idMenuParent , and if it has for example value 2, to get the
div id="secondary-menu-items" background as blue in color, else any other value should return gray color.
Anyone can help me solve this issue?