This question already has an answer here:
- How can I sort arrays and data in PHP? 10 answers
I want to sort only those values in array which are not 0 and all 0 values key should be at bottom. so for example if our array is like this-
array
{
[0]=>4
[1]=>0
[2]=>2
[3]=>0
[4]=>3
}
So sorted array I should get like below
array
{
[2]=>2
[4]=>3
[0]=>4
[1]=>0
[3]=>0
}
</div>