note 45214 added to function.sort
| From: | teunkloosterman at hotmail dot com | Date: | Mon, 30 Aug 2004 08:14:05 +0000 |
| Subject: | note 45214 added to function.sort | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-75656@lists.php.net to get a copy of this message | ||
Just to show how it sorts:
<?php
$array = Array("1", "2", "3", "4", "5",
"6", "7", "8", "9", "0", "a",
"b", "c", "d", "e", "f", "g",
"h", "i", "j", "k", "l", "m",
"n", "o", "p", "q", "r", "s",
"t", "u", "v", "w", "x", "y",
"z", "A", "B", "C", "D", "E",
"F", "G", "H", "I", "J", "K",
"L", "M", "N", "O", "P", "Q",
"R", "S", "T", "U", "V", "W",
"X", "Y", "Z", " ", "!", "@",
"#", "\\\$", "%", "^", "&", "*",
"(", ")", "_", "-", "=", "+",
"\\\\", "|", ",", "<", ".", ">",
"?", "'", "\\\"", "`", "~");
sort($array);
echo implode("", $array);
?>
returns:
!"#$%&'()*+,-.0123456789<=>?
@ABCDEFGHIJKLMNOPQRSTUVWXYZ
\^_`abcdefghijklmnopqrstuvwxyz|~
note: the result begins with a space
----
Manual Page -- http://www.php.net/manual/en/function.sort.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+45214
Delete -- http://master.php.net/manage/user-notes.php?action=delete+45214&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+45214&report=yes
Search -- http://master.php.net/manage/user-notes.php