I have an array like this
$array = [
125 => '3110 - with a string',
128 => '3009 - keep a string',
126 => '3111 - a string',
121 => '3114 - be a string',
122 => '3113 - last string',
]
Is there any way to use the PHP default sort functions to sort this array alphabetically and ignoring the concatenated integer values?
The result should be
[
126 => '3111 - a string',
121 => '3114 - be a string',
128 => '3009 - keep a string',
122 => '3113 - last string',
125 => '3110 - with a string',
]
I tried with sort and asort functions but it did not help.
asort($array, SORT_STRING);