I have multiple checkboxes with category names and their values. After every form submission an array is generated.
Here is the example:
Array
(
[user_type] => Array
(
[0] => Freelancer
[1] => Company
)
[category] => 19
[sub_category] => Array
(
[0] => Website UI Designing
[1] => Website Development
)
)
now I want from above array build a mysql query like---
select * from table_name
where user_type in ('Freelancer','Comapny')
and category in (19)
and sub_category in ('Website UI Designing','Website Development')
any help will be appreciated. thanks