SEO Forums















                                          
User   Password   remember     (register)  ?

PHP ksort


Back to php.


moderator    (2008-08-02)

moderator

 
PHP ksort

Definition and Usage

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

Syntax

ksort(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");

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


The output of the code above will be:

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



ficgs
Suggestions

 Javascript equivalent for PHP's ksort
kevin.vanzonneveld.net/techblog/article/javascript_equivalent_for_phps_ksor

 PHP: ksort - Manual
php.filearena.net/manual/kr/function.ksort.php

 PhpDig.net - PHP - ksort
www.phpdig.net/ref/rn03re48.html

 PHP: ksort - Manual
bogambilya.asti.dost.gov.ph/manual/fr/function.ksort.php

 PHP :: Ksort
www.bigresource.com/PHP-ksort-N7DbwK0H.html

 PHP: ksort - Manual
php.off.co.il/manual/sk/function.ksort.php



ficgs
More suggestions

This is a collaborative page, you may change the order of these suggestions by registering, then clicking the icons before the titles.


 PHP: ksort - Manual
php.virginmedia.com/manual/en/function.ksort.php

 PHP: ksort - Manual
php.nusa.net.id/manual/en/function.ksort.php

 web3.net - PHP / ksort
web3.net/gb/de/manuals/phpen/function.ksort.html

 PHP: ksort - Manual
br.php.net/ksort

 php ksort() 函数 - 用法|在线手册|属性|方法
www.fzs8.net/php/php_tutorial/2007-03-18/967.html

 PHP : ksort - Sort an array by key
www.thaicreate.com/php-manual/function.ksort.html

  [wp-cvs] wordpress/wp-admin menu.php, 1.27, 1.28 templates.php, 1.25, 1.26 theme-editor.php, 1.2, 1.3 wp-admin.css, 1.64, 1.65
comox.textdrive.com/pipermail/cvs/2004-September/000449.html

 Icemelon -- PHP, CSS, Javascript Tutorials, & More!
www.icemelon.com/php/preg_replace.htm

  PHP : Function Reference : Array Functions : ksort PHP Examples Tutorials References
www.navioo.com/php/docs/function.ksort.php

 PHP Manual: ksort
www.nusphere.com/kb/phpmanual/function.ksort.htm

 Easy Urpmi
easyurpmi.zarb.org/svn/tags/v0_4_4-4/urpmi.setup/www/urpmiweb.php

 BB FORUM - Powered by X M B 1.8 Partagum Final SP1
billybussey.com/forum/viewthread.php?tid=18573

  // Tool to compare two language versions and merge the better translation in one file // // Just copy the version to merge in this fo...
cvs.moodle.org/contrib/old/compuproggy/merger.php?view=co

 [#ZF-5883] Headlink.php line 310 ksort throws error - Zend Framework Issue Tracker
framework.zend.com/issues/browse/ZF-5883

 Interactive PHP Shell (a la Python) | Web Hosting Blog - Lusion Technologies - South Africa
www.lusion.co.za/blog/2008/06/07/interactive-php-shell-a-la-python/

 Array Key sort by ksort
www.plus2net.com/php_tutorial/array-ksort.php

 Wordpress Hooks & Filters Flow
planetozh.com/download/plugins/wp-hooks-filters-flow.txt

 WeberDev.com -> PHP Manual -> Sort an array by key
www.weberdev.com/Manuals/PHP/function.ksort.html

 Trie un tableau suivant les clés
les-da-silva.fr/docPhp/function.ksort.html

 ire_once('admin.php'); $themes = get_themes(); $ct = current_theme_info(); $allowed_themes = apply_filters("allowed_themes", get_site_allowed_themes(...
svn.automattic.com/wordpress-mu/tags/2.6/wp-admin/themes.php

 STUDIO WING .lib: PHP:ksort()関数・krsort()関数
lib.stwing.jp/archives/2005/11/phpksortkrsort.html

 Multi-dimensional array ksort loop - PHP - Snipplr
snipplr.com/view/14328/multidimensional-array-ksort-loop/

 Side-B » Blog Archive » PHP:ksort
side-b.sto.co.jp/weblog/archives/201

 Problēma ar ksort ().. - php.lv forumi
php.lv/f/index.php?showtopic=7730



Response  
  Smilies

Guest name   (optional)       Register for more options.



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.









 

FICGS message




SEO forums and chat - Search engines optimization



 

March 19, 2010

 

Buttons: Facebook, Twitter, MySpace, Google, Technorati, Yahoo buzz... Ficgs Facebook Myspace Twitter Google Technorati Stumble upon Delicious Digg Yahoo buzz Wikio Furl Reddit Linkedin Squidoo Newsvine Yahoo My Web Blogmarks Comments Blinklist Email

You comment I follow : Links included in comments will be "dofollow" if your post is not an obvious spam, comments are published instantly.


Write upside down to your contacts !
(works with Facebook, Twitter, MSN, Yahoo, MySpace, Hi5, Bebo, Youtube...)







FICGS is also a Free Internet Correspondence Games Server.

Here you can play Chess, Go & Poker Texas Holdem online for free in rated class tournaments and a unique world championship.

Free Internet Chess & Go Server


Feel free to link to FICGS :