claudiu-c
2/8/2017 - 4:19 PM

sort array multisort

$swatches = $_option->getValuesCollection()->getData();
foreach( $swatches as $key => $value):
  $new_swatch[$key] = $value['sort_order'];                                       
endforeach;
array_multisort($new_swatch, SORT_ASC, $swatches);