How can i sort this array by arrray key
array( 4 => \'four\', 3 => \'three\', 2 => \'two\', 1 => \'one\', )
like this
Try krsort() - that will sort in reverse using the array key, whereas rsort will sort on the array value.