So, if I wanted to organize the list of websites alphabetically, and all of them would be like this: example1.com, test.com, stackoverflow.com, google.com, that would be easy. However, I also want to organize subdomains. Consider the following three areas:
a.domain.com domain.com anotherdomain.com
If I transferred them to the software in alphabetical form, they would be in alphabetical order as follows:
a.domain.com anotherdomain.com domain.com
However, I do not want them to be in alphabetical order. I want them to be in alphabetical order by domain, and then by subdomain as a "tie-breaker", in other words, like this:
anotherdomain.com domain.com a.domain.com
Can someone tell me how to make PHP (or JavaScript) code for this? (It can be assumed that each βwebsiteβ is on a new line of code.)
Arceus
source share