phposclass

How to display name of current category being searched in osclass


I want to show name of current category being searched in category field in the header.

I tried this code but it shows "Array".

<?php echo osc_search_category(); ?>

Any idea?


Solution

  • I found following code working for me

    $cName = Category::newInstance()->findNameByPrimaryKey(osc_search_category_id());