Answer the question
In order to leave comments, you need to log in
How to sort an array using regular expression?
Hello. Help with array sorting.
[0] => Array
(
[id] => 1
[VALUE] => Moscow
)
[1] => Array
(
[id] => 2
[VALUE] => v. Volki
)
[2] => Array
(
[id] => 3
[VALUE] => village Orekhovo
)
[3] => Array
(
[id] => 4
[VALUE] => village Bratylovo
)
Must be sorted by the value of the key [VALUE], in alphabetical order , while ignoring the prefixes (y., d. ...). The result should be:
settlement Bratylovo
, Volki
, Moscow
x. Nuts
function cmp($a, $b)
{
};
usort($Array, 'cmp');
Thank you!
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question