I need to get the collection
using custom product Ids
but it should sort the collection based on the sequence product Ids given
Here is what I am doing now, but it is not sorting in sequence
$collection->addAttributeToFilter('entity_id', array('in' => $productIdsarray));
Any help would be appreciated