I would like to count the occurrence of each duplicate item in an array and end up with an array of only unique/non duplicate items with their respective occurrences.
codeigniters where and or whereI am trying to use if($cat_id){$this->db->where("q.question_cat_id",$cat_id);if($sub){$this->db->where_or("q.question_sub_id",$cat_id);}}But geting error..