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