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 |
What are the file upload settings in configuration file?
what are the various PHP Script Optimization techniques?
1 Answers IBM, Krify Software Technologies, TCL,
what do you mean by php.ini file ?????????
Explain difference between urlencode and urldecode?
Is ruby on rails php?
what is the best function that can be used to connect to mysql database and in what cases that we can use below functions ? 1. mysql_connect() 2. mysql_pconnect() please give your answer with all pros and cons
What is the difference between Session and Cookie?
What is stripslashes php?
What are the security measures we have to take for our site not to hack by others.
3 Answers Infosys, Torque Infotech,
Write a program to display a table of any given number?
How to get the length of string?
A process can run only in the background. State Whether True or False?