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 |
Tell me how to retrieve a cookie value?
Is there any function to find repeated value in an array? What is w2 standard
What Is a Persistent Cookie?
what is benefit of magento?
What's diffrence between Get() and Post() Function
When to use self over $this?
Explain what are the different errors in php?
What is echo and print in php?
How to get the ip address of the client?
Which function is used to strip whitespace?
what method is used to get a user's IP address?
What difference between require() and require_once()?