I enter that code, but it doesn’t work properly and it shows the power several times
image
>Solution :
This seems to be happening because you have 3 products that have category id as ‘3’ and that category name I guess is ‘Power’. So, when you are selecting all the categories where each category id should match with the product id so it is returning you all the categories that matches with each of your product’s category id.