3
votes
0answers
47 views

Sorting a PHP array in a discontinuous manner

I start with an array containing some 'ids' and some 'values'. What I need is to organize the 'ids' in a new array to be, if possible, apart when the 'values' they are associated with are alike. So ...
1
vote
0answers
32 views

Sort by value in multidimensional array

I have a multidimensional array of house properties: ...
1
vote
0answers
41 views

Take an array and return “n” elements, as evenly spaced as possible

I get the following correct results from this code, but it seems incredibly clunky to me. Is there anything I could be doing more elegantly? The results can be imprecise - as long as it's the right ...