if what you are talking about is a tree structure, then all you need in your db table is:
id - the unique id of any data leaf or node
parent - the id if whatever node this item belongs under -- set to zero or NULL for root level items
content - might want to break this into several fields such as name, icon_image, description, etc.
url - you'll need this if you're building breadcrumbs or links and you can't readily convert your id into a url.
when you are showing an item, all you need is its id and you can fetch it's parent:
$parent_id=1234;
$sql = "SELECT * FROM tree WHERE id=$parent_id";
or its children
$this_id = 5678;
$sql = "SELECT * FROM tree WHERE parent=$this_id";
you could use $db_key from my previous code as an id if you really wanted to but you should probably limit your URLS' length if you do. another possibility would be to use a hash function like md5() to convert a url to some 32 digit number and use THAT as an id.
the whole trick now is to think more about what kind of functionality you want. do you want a tree view on the left with collapsible nodes? you'll probably need a frame and a script that builds the entire tree. flash is good for this...so is AJAX.
if you don't want a tree, you still might want breadcrumbs which display the parent objects. would there be links to these? If so, you should probably store the URL in the tree table i just described. otherwise, you need to be able to turn a database ID value into a url (which you could with my code by using explode() to separate your id at each dash and then imploding with /. problems with this approach? you can't have dashes or slashes in your directory names or you'll have consistency problems. you are also limited in your URL length. if you use a hash function to convert URLs to dbase keys, then you free yourself from URL length limitations, but you definitely need to store the URL for a given database item so that when you fetch it, you can link to it.
sounds like you need to just put some thought into what you want to come up with more specific php questions.