PHP arsort

Back to php.

moderator    (2008-08-02)


PHP arsort

Definition and Usage

The arsort() function sorts an array by the values in reverse order. The values keep their original keys. This function returns TRUE on success, or FALSE on failure.



array : Required. Specifies the array to sort

sorttype : Optional. Specifies how to sort the array values. Possible values:

* SORT_REGULAR - Default. Treat values as they are (don't change types)
* SORT_NUMERIC - Treat values numerically
* SORT_STRING - Treat values as strings
* SORT_LOCALE_STRING - Treat values as strings, based on local settings

$my_array = array("a" => "Hamburger", "b" => "Cheese", "c" => "Jam");


The output of the code above will be:

[c] => Jam
[a] => Hamburger
[b] => Cheese

See also

More websites

You must register to see these links, as this is a collaborative page, then you may change the order of the links by clicking the icons before the titles.

Other websites

The following links might be less relevant, please change their ranks if you find them useful. - PHP - *
phpdig > ref/rn03re37
  1. and is designed to provide information about the PHP programming
  2. (optional): Flag specifying how to compare element
 Javascript equivalent for PHP's *
kevin.vanzonneveld > techblog/article/javascript equivalent for - PHP / *
goldvision > us/en/manuals

 PHP Manual: *
nusphere > kb

 Array * the reverse sort

it is very human view that you help others by displaying your...
function we can retain the index or indices associated with...

  * () Function
kenhmuaban > manual

  * () 函数 - 用法|在线手册|属性|方法

 HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> * PHP ManualPrevNext * (PHP 3, PHP 4 , PHP 5) * -- Sort an array ...
php.activeventure > function/a c/function.arsort

 PHP Editor Review - Php Manual Function *
php editors

 PHP : * - Sort an array in reverse order and maintain index association

  * PHP ManualPrevNext * (PHP 3, PHP 4 ) * -- Sort an array in reverse order and maintain index association Descripti...

 The Apache Software Foundation Mailing Lists
svn.apache > repos/asf/labs/pulse/report web/mlists.

  * : Sort an array in reverse order and maintain index association : Array sort « Data Structure « PHP
java2s > Code

Pass a second parameter to the sort functions to specify how you want...
Using uasort() to Sort a Multdimensional Associative Array by One of...

 [PHP-ES] ayuda con * :: ASPN Mail Archive :: php-spanish
aspn.activestate > ASPN/Mail/Message

 PHP - 函数: * ()
study.chyangwa > IT

  * - PHP manual
phpf1 > manual/arsort

 PHP : Function Reference : Array Functions : * PHP Examples Tutorials References

arsort Sort an array in reverse order and maintain index...

 function. * - PHP Manual - Cheap Web Hosting Providers
cheaphostdir > reference

 PHP Blog » *
vaziliy > blog/?tag=arsort

 function * (standard)
zugeschaut und mitgebaut

 PHP - * - Array-Funktionen
selfphp > funktionsreferenz/array funktionen/arsort.

Kaspersky Lab ist ein weltweit führendes Unternehmen, dessen...
Download – Compare – Decide! Build Your Best, Without Limits or...
Die Online-Abteilung der ehemaligen VNU Business Publications...



Guest name   (option)     Register
Please sum : 2065 + nine  

Trackbacks : If you talked about this article in your blog or website, you may instantly get a backlink 
There's no trackback at the moment.