@wakabayashi Thanks, working.
How can add another sort
arraymultisort( arraycolumn($products, "reference"), SORTASC, $products, array_column($products, "location"), SORT_ASC, $products ); doesn't working.
I want to sort products by reference(it's already working) and location (from table productwarehouse_location)