ap_get_option('array'); if (!$dbopt) $dbopt = array(); $newopt = $ap_favC->ap_array_merge_recursive_distinct($dbopt,$options); $dbopt = array(); foreach ($newopt as $key => $value){ if ($value){ if (is_array($value)){ // handle if array foreach ($value as $subkey => $subvalue){ if ($subvalue){ $dbopt[$key][$subkey] = $subvalue; } } }else{ //not an array $dbopt[$key] = $value; } } } return $dbopt; } ?>