[snip] $result = mysql_query( "SELECT id, name, surname, address FROM addresses"); This scripts works, but.. my desire is now to be able to sort the output, wich is generated by the 'while' loop, for instance on 'name', or on 'surname' . [/snip]
Do it in the query "SELECT id, name, surname, address FROM addresses ORDER BY name" "SELECT id, name, surname, address FROM addresses ORDER BY surname" etc. You can sort the array too, but the database in perfectly equipped to perform the sort much more efficiently. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php