First, please excuse me if this is not clear. English is not my first language, though I have tried very hard to make this as intelligible as possible. I am having trouble sorting a multi-dimensional array in PHP. I have reviewed the various array functions on php.net and w3schools, but am still having difficulty.
I have a multi-dimensional array in this form:
$test_array[$counter]['post_id']
$test_array[$counter]['votecount']
$test_array[$counter]['content']
I am trying to sort the array by votecount, so that the post id with the highest votecount is first and then descends from there. I want to get it into a form such as below:
Votes: 10
Post ID: 4
Content: hhgjhg
Votes: 7
Post ID: 26
Content: fhghg
Votes: 6
Post ID: 15
Content: ytryrd