I have values in database in array and I want to search values also from an array.
For example :
I have an array ('13,14') and in database I have values like (13,14) or (13) or (14) or (15). So when I search ('13,14') results should appear with values containing at least one of them.
I'm assuming you're using a collection, as
addAttributeToFilter()is a collection method. Here's how your filter your collection with a set of possibilities, for a given attribute :'id'being the name of your attribute. You can also use the operatornininstead ofin, to specify a set of values you don't want your attribute value to be in. Check the other operators here : https://fishpig.co.uk/magento/tutorials/addattributetofilter/