Ciao!
Codice PHP:
<?php
function get_CurrPath($id)
{
$path = array();
$i = 0;
while ($id != 0 && $i < 100)
{
$query = mysql_query("SELECT * FROM tua_abella WHERE id = '$id'");
$result = mysql_fetch_array($query);
$id = $result['parent'];
$path[] = array($result['id'], rtrim($result['name']));
$i++;
}
return array_reverse($path);
}
function print_CurrPath(&$path)
{
$retval = '';
for($i = 0; $i <= count($path) - 1; $i++)
{
if ($i == count($path) - 1)
{
$retval .= '<strong style="color: #FF0000 ">' . $path[$i][1] . '[/b]';
}
else
{
$retval .= '[url="?c=' . $path[$i][0] . '"]' . $path[$i][1] . '[/url] » ';
}
}
echo $retval;
}
?>
Devi solo modificare i campi secondo le tue esigenze...
Questo lo uso per la mia directory sul mio sito, te l'ho modificato un pò perchè il mio ha qualche cosa in più che dubito ti serva!
Comunque dovrebbe andare!