<?php $array = [ "absd.com", "bfhgj.org", "sdfgh.net", "sdff.com", "jkuyh.ca", "example.com", "lkjhg.org.au", "bfhgj.co.uk", "blah.com", "sdfgh.org.uk" ]; usort( $array, fn($a, $b) => strstr($a, '.') <=> strstr($b, '.') ); var_export($array);
You have javascript disabled. You will not be able to edit any code.