List Info

Thread: note 63798 added to function.natsort




note 63798 added to function.natsort
user name
2006-03-31 07:54:07
Hello, I haven't founf function to sort keys in
"natural order", so may be someone will find
this useful:

<?
function natksort ( $arrayIn ) {
  $arrayOut  = array ();
  $arrayTemp = array ();
 
  $arrayTemp = array_keys( $arrayIn );

  natsort ( $arrayTemp );
  
  foreach ( $arrayTemp as $key ) {
    $arrayOut[$key] = $arrayIn[$key];
  }
  return $arrayOut;
}
?>
----
Server IP: 193.219.81.76
Probable Submitter: 213.197.139.102
----
X-Spam-Status: No, hits=3.1 required=5.0
tests=DATE_MISSING,FROM_NO_LOWER 
	autolearn=no version=2.64
----
Manual Page -- htt
p://www.php.net/manual/en/function.natsort.php
Edit        -- http://master.p
hp.net/note/edit/63798
Del: integrated  -- ht
tp://master.php.net/note/delete/63798/integrated
Del: useless     -- http:
//master.php.net/note/delete/63798/useless
Del: bad code    -- http
://master.php.net/note/delete/63798/bad+code
Del: spam        -- http://m
aster.php.net/note/delete/63798/spam
Del: non-english -- h
ttp://master.php.net/note/delete/63798/non-english
Del: in docs     -- http:
//master.php.net/note/delete/63798/in+docs
Del: other reasons-- http://master
.php.net/note/delete/63798
Reject      -- http://master
.php.net/note/reject/63798
Search      -- http://ma
ster.php.net/manage/user-notes.php

-- 
PHP Notes Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub
.php

note 63798 deleted from function.natsort by nlopess
user name
2006-03-31 09:42:51
Note Submitter: Juokelis 

----

Hello, I haven't founf function to sort keys in
"natural order", so may be someone will find
this useful:

<?
function natksort ( $arrayIn ) {
  $arrayOut  = array ();
  $arrayTemp = array ();
 
  $arrayTemp = array_keys( $arrayIn );

  natsort ( $arrayTemp );
  
  foreach ( $arrayTemp as $key ) {
    $arrayOut[$key] = $arrayIn[$key];
  }
  return $arrayOut;
}
?>

-- 
PHP Notes Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub
.php

[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )