this question looks like it should have a simple answer but google and the php manual are being no help to me, maybe I just don't understand what they are telling me.
I have an array example:
$outcomes_array = array(1,4,2,3,5);
It will always contain just numbers, how do I go about sorting this array so that it is always in descending order?
so output I want:
$outcomes_array[0] = 5
$outcomes_array[1] = 4
$outcomes_array[2] = 3
and so on...
Thanks :)
Use rsort()
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With