PHP krsort


Back to php.


moderator    (2008-08-02)

moderator

PHP krsort

Definition and Usage

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

Syntax

krsort(array,sorttype)

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


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

krsort($my_array);
print_r($my_array);
?>


The output of the code above will be:

Array
(
[c] => Jam
[b] => Cheese
[a] => Hamburger
)



ficgs
Suggestions


ficgs
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.



admin
Other websites

The following links might be less relevant, please change their ranks if you find them useful.


 Javascript equivalent for PHP's *
kevin.vanzonneveld > techblog/article/javascript equivalent for

 PhpDig.net - PHP - *
phpdig > ref/rn03re47

and is designed to provide information about the PHP programming...

  * () error fixed - ScriptLance Programming Project
scriptlance > projects/1076289851.shtml

 PHP Manual: *
nusphere > kb

 Array Key reverse sort by *
plus2net

Submit your email address and receive article and product...

 PHP: * - Manual
php.mirrors.powertrip > manual/fi/function.krsort.

 PHP 함수 - *
flashcafe

역순으로 키에 의해 배열을 정렬하고, 키와...

 WeberDev.com -> PHP Manual -> Sort an array by key in reverse order
weberdev > Manuals

Sorts an array by key in reverse order, maintaining key to data...

 PHP : * - Sort an array by key in reverse order
thaicreate

You may modify the behavior of the sort using the optional...
Sorts an array by key in reverse order, maintaining key to data...

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

 HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> * PHP ManualPrevNext * (PHP 3>= 3.0.13, PHP 4 , PHP 5) * -- Sort an...
php.activeventure > function/j l/function.krsort

 PHP Editor Review - Php Manual Function *
php editors

 配列をキーで逆順にソートする - PHPプロ!マニュアル
phppro

『ノン・プログラマのためのPHP入門...

  * - PHP manual
phpf1 > manual/krsort

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

 PHP: krsort
pixel.fpn > kezikonyv/function.krsort.

 PHPXRef 0.7 : WordPress : Function Reference: * ()
phpxref.ftwr > wordpress/ functions/krsort

 Using * in PHP
akifkardas > 2008/05/08/using krsort in

 function * (standard)
zugeschaut und mitgebaut

 krsort()
phorum > phorum5/read.

maxtop) curtop = curtop - phorum_mod_post_previews_height -...

 Bug #17257: rsort (and * ) broken :: ASPN Mail Archive :: php-Dev
aspn.activestate > ASPN/Mail/Message

 [Xaraya_bugs] [Bug 4538] New: xarclass/xarcss.class.php (Line: 221) * () expects parameter 1 to be array, null given
xaraya > pipermail/xaraya bugs/2005 May/008667

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

  * PHP ManualPrevNext * (PHP 3>= 3.0.13, PHP 4 ) * -- Sort an array by key in reverse orderDescriptionint * ( array a...
ific.uv > informatica/manuales

 ire_once('admin.php'); require_once( ABSPATH . WPINC . '/registration-functions.php'); $title = __('Users'); $parent_file = 'users.php'; $action = ...
source.ibiblio > svn/lyceum/tags/1.0 RC3/src/lyceum/wp admin/users.

SearchUsers = { search_users: function () { new...

 FAIL Test arsort, asort, * , ksort, rsort, and: msg#00437 php.quality-assurance
osdir > ml

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

Wie latenz bist Du wirklich? Jetzt herausfinden auf unseren sexy...
DHTMLX Ajax toolkit offers a comprehensive set of JavaScript UI...



Response  
 

Guest name   (option)     Register
Please sum : 1623 + eight  




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.