Hi , thanks for your answer !
I'm a noob web coder =P but when i read you, i realized i was maybe thinking too complicated ... 
Anyway after fighting with the bookmark syntax 'logic ?', i succed to do something !
here is the PHP code bellow (assuming all files (js, css, php, html, gif) are in same directory) :
Code:
<?php
// DISPLAY/SAVE YOUR (ALREADY) UPLOADED BOOKMARKS AS TREE MENU.
// EDIT BELLOW !
$originalBookmarkFile = 'bookmarks.html'; // name of the bookmark file to display as a tree
$displayResult = 'yes'; // change to : no , if you don't want to display the result (yes , is default)
$saveNewFile = 'no'; // change to yes to save the modified bookmark file (no, is default)
$fileToSave = 'booktree.html'; // name the file to be saved
// NO EDIT NEEDED AFTER THIS LINE !
// get the file content ina string
$fh = @fopen("$originalBookmarkFile", "r") or die("can't open file");
$file = @file_get_contents("$originalBookmarkFile");
@fclose($fh);
// work on string to make it becomes an html list (and bookmark type as classic page type)
$endPage = "\n</BODY>";
$file = str_replace('<META HTTP-EQUIV=',"<HEAD>\n<META HTTP-EQUIV=",$file);
$file = str_replace('</TITLE>',"</TITLE>\n</HEAD>\n<BODY>",$file);
$file = str_replace('<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">','',$file); // fix other browser than IE
$file= str_replace('<DD>Add bookmarks to this folder to see them displayed on the Bookmarks Toolbar','',$file); // remove firefox comments
$file = str_replace("</H1>","</H1>\n<ul id=\"treemenu1\" class=\"treeview\">\n<li><H3>Click to Browse Bookmark Tree</H3>",$file);
$file = str_replace('<DT><H3',"<li><H3",$file);
$file = str_replace('<DT><A HREF=','<li><A HREF=',$file);
$file = str_replace('</A>','</A></li>',$file);
$file = str_replace('<DL><p>','<ul>',$file);
$file = str_replace('</DL><p>',"</ul>\n</li>",$file);
$file = str_replace('<DD>',"''",$file);
$file = $file.$endPage;
// Adding simplemenu.css
$file = str_replace('</HEAD>',"<link rel=\"stylesheet\" type=\"text/css\" href=\"simpletree.css\" />\n</HEAD>",$file);
// Adding simplemenutree.js
$file = str_replace('</HEAD>',"<script language=\"JavaScript\" src=\"simpletreemenu.js\" type=\"text/javascript\"></script>\n</HEAD>",$file);
$file = str_replace('</BODY>',"</ul>\n<script type=\"text/javascript\">ddtreemenu.createTree(\"treemenu1\", 'contract')</script>\n</BODY>",$file);
// display result
if ($displayResult != 'no'){
echo $file;
}
// save the new bookmark file
if ($saveNewFile == 'yes'){
$fileToSaveHandle = @fopen($fileToSave, 'w') or die("can't open file");
@fclose($fileToSaveHandle);
$Handle = @fopen($fileToSave, 'a');
@fwrite($Handle, $file);
@fclose($Handle);
}
?>
Sorry in advance for the 'basic' code, but i do with what i know =P
If someone can post a simplified or more efficient code, feel free =)
Thanks again Medyman for your post !
Bookmarks