I'm look to naturally sort an array, in reverse order and not preserve the keys. For example, I'd like this array:
[0] => 1-string
[1] => 2-string
[2] => 10-string
[3] => 4-srting
[4] => 3-srting
To end up like this:
[0] => 10-srting
[1] => 4-string
[2] => 3-string
[3] => 2-string
[4] => 1-string
I've got it close with usort($array, 'strnatcmp'); but it's not in reverse order. array_reverse() after doesn't help.
Any ideas?
1-string, 10-string, 2-string, 3-string, 4-stringand unnatural would be4-string, 3-string, 2-string, 10-string, 1-string. I have been known to misunderstand things (as i am married and miscommunications happen 24/7), so could you give a more in depth explanation, for i do not understand your ordering system.