Wrong order of entities, how to change that? I've created my first module which shows a list with nodes containing a certain term (like a taxonomy list, like usual), but the entities gets listed in an unknown way - I'm new to this and don't know - and I want them to be listed in alphabetical order.

How do I change that?

Code to retrive and print the entities:

function mymodule_cmp($a, $b) {
  $a = (array) $a;
  $b = (array) $b;
  return strcmp($a['name'], $b['name']);

}

$terms = taxonomy_get_tree(10,0,1);

usort($terms, "mymodule_cmp");

$counter = 0;

$result = taxonomy_select_nodes($tid, FALSE);

foreach($result as $nid) {

    $node = node_load($nid);

            // Prints all that is needed.
    }
Take a look at the Drupal API taxonomy_select_nodes(). You are missing the $order argument.

taxonomy_select_nodes($tid, $pager = TRUE, $limit = FALSE, $order = array('t.sticky' =&gt; 'DESC', 't.created' =&gt; 'DESC'));