note 75346 added to function.ksort
| From: | dondothosekatgmaildotcom at osu1 dot php dot net | Date: | Fri, 25 May 2007 01:37:39 +0000 |
| Subject: | note 75346 added to function.ksort | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-126879@lists.php.net to get a copy of this message | ||
It's worth noting that ksort is also handy if you want to be able to do manipulations on an
numerically-keyed array which may not have been initialized in numerical order:
$a[2]=7;
$a[0]=1;
$a[1]=6;
foreach($a as $b) {
echo "$b ";
}
$a = ksort($a);
foreach($a as $b) {
echo "$b ";
}
----
Server IP: 203.199.124.111
Probable Submitter: 65.91.98.102
----
Manual Page -- http://www.php.net/manual/en/function.ksort.php
Edit -- https://master.php.net/note/edit/75346
Del: integrated -- https://master.php.net/note/delete/75346/integrated
Del: useless -- https://master.php.net/note/delete/75346/useless
Del: bad code -- https://master.php.net/note/delete/75346/bad+code
Del: spam -- https://master.php.net/note/delete/75346/spam
Del: non-english -- https://master.php.net/note/delete/75346/non-english
Del: in docs -- https://master.php.net/note/delete/75346/in+docs
Del: other reasons-- https://master.php.net/note/delete/75346
Reject -- https://master.php.net/note/reject/75346
Search -- https://master.php.net/manage/user-notes.php