Array Sorting By Brand Name

JohnLogar

Active member
I have an array of products that contain different brand names. I want to sort the array in specific order given by input fields like ( Nike, Addidas, etc). In this case, the first product should be Nike and Addidas, and so on. I'm trying to achieve with foreach loop but wouldn't be getting the desired results.

Thanks
 
Back
Top Bottom