Answer the question
In order to leave comments, you need to log in
I need to sort an array, what is the best way to do it?
There is an array like this
/frontend/web/ru/customer/request/active => 1
/frontend/web/ru/customer/request/create => 2
/frontend/web/ru/customer/request/create?product_type=5&_pjax =%23p0 => 3
/frontend/web/en/customer/request/create?product_type=3&_pjax=%23p0 => 1
/frontend/web/en/customer/request/create?product_type=1&_pjax=%23p0 => 1
/frontend/web/ru/customer/request/view?id=1085 => 1
/frontend/web/ru/customer/bid/view?id=1718 => 8
/frontend/web/ru/customer/bid/active => 2
/frontend/web/en/customer/bid/generate-contract?id=1718 => 1
/frontend/web/en/customer/bid/generate-and-download-contract?id=1718 => 1
/ frontend/web/ru/customer/bid/validate-checkout => 4
/frontend/web/ru/customer/bid/checkout => 1
/frontend/web/ru/customer/bid/notify => 1
/frontend/web/ru/customer/bid/view?id=1718&_pjax=%23correspondence- body => 1
/frontend/web/en/customer/bid/view?id=1718 => 4
you need to make it sort by value, i.e. this view
/frontend/web/ru/customer/bid/view?id =1718 => 8
/frontend/web/ru/customer/bid/validate-checkout => 4
/frontend/web/en/customer/bid/view?id=1718 => 4
/frontend/web/ru/customer/ request/create?product_type=5&_pjax=%23p0 => 3
/frontend/web/ru/customer/bid/view?id=1718&_pjax=%23correspondence-body => 1
etc
How can this be implemented?
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