How can I reverse sort an array keeping the correlation
between the index and value?
Answers were Sorted based on User's Feedback
Answer / jude jeevanraj.p
This is done using the arsort function:
<?php
$myworld = array
("a"=>"everything","b"=>"nothing","c"=>"is");
arsort($myworld);
print_r($myworld);
?>
Which prints this:
Array
(
[b] => nothing
[c] => is
[a] => everything
)
Is This Answer Correct ? | 3 Yes | 6 No |
Who is the father or inventor of php?
Why do we use csrf token?
How can we increase execution time of a php script?
Can I write php code in html file?
Which is better php praogramming or cad/cam scope wise and also salaray wise?
Specify array sort functions available in php ?
Explain what are the different errors in php?
Which php framework is best for web development?
What is the use of rand() in php?
what are the errors and when we get that particular errors.and who will give that errors
Why is facebook still using php?
can anyone tel me about the Expression engine Note:Its a CMS in Php