The day before yeserday I published a Mootools class that creates a table of contents of all the headings on a page. This can also be done with php and this will be a faster and cleaner method. See the code below:
The usage
The syntaxhighlighter messes up the php so look at at the function createIndex() in this phps file.
echo createIndex($text);




