Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

How can I reverse sort an array keeping the correlation
between the index and value?

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What does csrf token mean?

934


How do I see how many pages per session in google analytics?

1006


How to create an empty array in php?

1104


Why php is widely used?

949


How do you end a function in python?

1011


How do I sort numbers in php?

1055


What is a static variable in php?

1059


What is strcmp () in php?

978


what does this symbol mean in php?

1149


Name some of the functions in php.

1011


What is sql injection in php?

1140


What is self in php?

1148


How to execute a php script from the command line?

1091


What does mvc stand for and what does each component do?

1083


Explain what is memcache?

993