function getSubCatBread($scid, $mid, &$breadArr)
{
    $sqlStr = "select * from trn_content_sub_category where SUB_CONTENT_CAT_ID = " . $scid;
    $rs = mysql_query($sqlStr) or die(mysql_error());
    if ($_SESSION['LANG'] == 'TH') {
        $selectedColName = 'SUB_CONTENT_CAT_DESC_LOC';
    } else {
        $selectedColName = 'SUB_CONTENT_CAT_DESC_ENG';
    }
    while ($row = mysql_fetch_array($rs)) {
        // echo count($breadArr);
        if (count($breadArr) == 0) {
            $breadArr[] = '<li class="active">' . $row[$selectedColName] . '</li>';
        } else {
            if (nvl($row['IS_LAST_NODE'], 'Y') == 'Y') {
                $breadArr[] = '<li ><a href="da-all-black.php?MID=' . $mid . '&CID=' . $row['CONTENT_CAT_ID'] . '&SCID=' . $row['SUB_CONTENT_CAT_ID'] . '">' . $row[$selectedColName] . '&nbsp;&nbsp;&nbsp;>&nbsp;&nbsp;</a></li>';
            } else {
                $breadArr[] = '<li ><a href="da-category-black.php?MID=' . $mid . '&CID=' . $row['CONTENT_CAT_ID'] . '&SCID=' . $row['SUB_CONTENT_CAT_ID'] . '">' . $row[$selectedColName] . '&nbsp;&nbsp;&nbsp;>&nbsp;&nbsp;</a></li>';
            }
        }
        if ($row['REF_SUB_CONTENT_CAT_ID'] > 0) {
            return getSubCatBread($row['REF_SUB_CONTENT_CAT_ID'], $mid, $breadArr);
        }
    }
}
function getSubCatBread($scid, $mid, &$breadArr)
{
    $sqlStr = "select * from trn_content_sub_category where SUB_CONTENT_CAT_ID = " . $scid;
    $rs = mysql_query($sqlStr) or die(mysql_error());
    while ($row = mysql_fetch_array($rs)) {
        //echo count($breadArr);
        if (count($breadArr) == 0) {
            $breadArr[] = '<li class="active">' . $row['SUB_CONTENT_CAT_DESC_LOC'] . '</li>';
        } else {
            $breadArr[] = '<li ><a href="all-content.php?MID=' . $mid . '&CID=' . $row['CONTENT_CAT_ID'] . '&SCID=' . $row['SUB_CONTENT_CAT_ID'] . '">' . $row['SUB_CONTENT_CAT_DESC_LOC'] . '&nbsp;&nbsp;&nbsp;>&nbsp;&nbsp;</a></li>';
        }
        if ($row['REF_SUB_CONTENT_CAT_ID'] > 0) {
            return getSubCatBread($row['REF_SUB_CONTENT_CAT_ID'], $mid, $breadArr);
        }
    }
}