Directory structure:

Stored as:
IdParentName
31Countries
43Belgium
53Netherlands
63Germany
75Business and Economy

Retrieve list with:

<?php
function gimmeParent($id) {
    global $dir;
    $res = mysql_query("SELECT parent, name FROM dir WHERE id=$id");
    if (mysql_num_rows($res) > 0) {
        $dir[] = ($row = mysql_fetch_row($res));
        gimmeParent($row['parent']);
    }
}
gimmeParent(7);