Ejemplo n.º 1
0
/**
*   Function to Display Category Ads
*/
function popular_category_start()
{
    $aCategory = array();
    while (osc_has_categories()) {
        $iCategoryId = osc_category_id();
        $sCategoryName = osc_category_name();
        $iTotalListing = osc_category_total_items();
        $iParentId = get_parent_category_id($iCategoryId);
        $aCat = array('total_listing' => $iTotalListing, 'cat_name' => $sCategoryName, 'cat_id' => $iCategoryId, 'parent_id' => $iParentId);
        array_push($aCategory, $aCat);
    }
    return array_sort($aCategory, 'total_listing', SORT_DESC);
}
Ejemplo n.º 2
0
function popular_category_start()
{
    $cat_array = array();
    while (osc_has_categories()) {
        $cat_id = osc_category_id();
        $cat_name = osc_category_name();
        $total_listing = osc_category_total_items();
        $parent_id = get_parent_category_id($cat_id);
        $cat = array('total_listing' => $total_listing, 'cat_name' => $cat_name, 'cat_id' => $cat_id, 'parent_id' => $parent_id);
        array_push($cat_array, $cat);
    }
    return array_sort($cat_array, 'total_listing', SORT_DESC);
}