[PHP-DEV] Bug #1086 Updated: sort() does not compare after first word From: Bug Database (php-dev <email protected>)
Date: 01/21/99

ID: 1086
Updated by: rasmus
Reported By: dreich <email protected>
Status: Closed
Bug Type: Misbehaving function
Assigned To:
Comments:

You must be doing something wrong. sort() works fine. Try this script, for example:

$BigArray = array("HOWTO talk", "HOWTO listen", "HOWTO be quiet");
sort($BigArray);
while(list($k,$v)=each($BigArray)) {
    echo "$k: $v\n";
}

This prints out:
0: HOWTO be quiet
1: HOWTO listen
2: HOWTO talk

Full Bug description available at: http://ca.php.net/bugs.php3?id=1086

--
PHP Development Mailing List   http://www.php.net/
To unsubscribe send an empty message to php-dev-unsubscribe <email protected>
For help: php-dev-help <email protected>