ID: 16215 Updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] Status: Feedback Bug Type: Unknown/Other Function Operating System: Unix PHP Version: 4.1.2 New Comment:
Jeremy and Eved, you need short & complete example. Short & complete example: - has "<?php" and "?>" tag - works as standalone. (i.e. paste code & execute must work) - number of lines should be 30 at most and code must be easy to read. Previous Comments: ------------------------------------------------------------------------ [2002-04-23 20:17:31] [EMAIL PROTECTED] same problem as mine (see number 16778). To solve the problem pass your array by reference to the function ex: uasort(&$array_to_be_sorted,"yourcmp") Your array $array_to_be_sorted is now sorted ... Don't expect any result returned by the function (for me it returns 1, maybe saying the array has been sorted) ------------------------------------------------------------------------ [2002-03-22 03:58:51] [EMAIL PROTECTED] Please provide a full copy&paste example ------------------------------------------------------------------------ [2002-03-21 21:18:34] [EMAIL PROTECTED] I just want to report that the example code for the uasort function in the PHP manual does not work and nothing gets sorted.. I've tried for hours and using multiple books to get uasort to work with multidimensional associative arrays and I have had no success... Am I possibly printing out the arrays incorrectly?? This is what i Used to display the sorted array in the example in the PHP manual: for ( $row = 0; $row < 3; $row++ ) { while (list($key, value) = each ($array[ $row] ) ) { echo "|$value"; } echo "|<BR>"; } this can be the only possible thing I find that could be wrong.. if my code is not incorrect than this is a bug in the program.. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=16215&edit=1