array_unique doesn't modify the array by reference, use $pAttList = array_unique($pAttList);