I have an array like this
Array
(
[0] => T-shirts
[1] => Evening Dresses
[2] => Dresses
[3] => Clothes
)
Here I want to get the values of the array and add "" for each values and add , after each value So the valus should finally come like this
IN("T-shirts","Evening Dresses","Dresses","Clothes")
so for this I made my code like this
$category_pool = '';
foreach($categoryArray as $categoryArr)
$category_pool .= $categoryArr.',';
$category_pool = ((strpos($category_pool, ',') === false) ? (' = '.$category_pool.' ') : (' IN ("'.rtrim($category_pool, ',').'") '));
But here it is getting the value like
IN ("T-shirts,Evening Dresses,Dresses,Clothes")
So can someone tell me how to make this value to come like
IN("T-shirts","Evening Dresses","Dresses","Clothes")
Any help and suggestions will be really appreciable. Thanks